Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 17EC5200C61 for ; Mon, 10 Apr 2017 17:55:14 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 16B9A160B99; Mon, 10 Apr 2017 15:55:14 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 8AC18160BA5 for ; Mon, 10 Apr 2017 17:55:09 +0200 (CEST) Received: (qmail 46269 invoked by uid 500); 10 Apr 2017 15:55:08 -0000 Mailing-List: contact commits-help@ignite.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.apache.org Delivered-To: mailing list commits@ignite.apache.org Received: (qmail 46215 invoked by uid 99); 10 Apr 2017 15:55:08 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 10 Apr 2017 15:55:08 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 6D992E69B1; Mon, 10 Apr 2017 15:55:08 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: agoncharuk@apache.org To: commits@ignite.apache.org Date: Mon, 10 Apr 2017 15:55:11 -0000 Message-Id: <467bbdcd155c40ea91baedd427c82df8@git.apache.org> In-Reply-To: <6249ec11a1c540ac927d10c6995c825f@git.apache.org> References: <6249ec11a1c540ac927d10c6995c825f@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [04/53] [abbrv] ignite git commit: ignite-4535 : Removing CacheMemoryMode - WIP. archived-at: Mon, 10 Apr 2017 15:55:14 -0000 ignite-4535 : Removing CacheMemoryMode - WIP. (cherry picked from commit b3e1bc3) Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/5ec807a5 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/5ec807a5 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/5ec807a5 Branch: refs/heads/ignite-3477-master Commit: 5ec807a53a812c47a5a8b22f98d57b25cccf0240 Parents: 3e71eda Author: Ilya Lantukh Authored: Tue Mar 21 16:27:18 2017 +0300 Committer: Ilya Lantukh Committed: Thu Mar 30 16:10:18 2017 +0300 ---------------------------------------------------------------------- .../apache/ignite/cache/CacheMemoryMode.java | 2 +- .../configuration/CacheConfiguration.java | 4 +- .../configuration/CollectionConfiguration.java | 4 +- .../internal/ClusterNodeMetricsSelfTest.java | 30 +- .../cache/CacheNearReaderUpdateTest.java | 11 - .../cache/CacheOffheapMapEntrySelfTest.java | 32 +- .../CachePutEventListenerErrorSelfTest.java | 13 +- .../CacheSerializableTransactionsTest.java | 53 +- .../cache/CacheSwapUnswapGetTest.java | 270 -------- ...idAbstractCacheInterceptorRebalanceTest.java | 6 - .../cache/GridCacheAbstractFullApiSelfTest.java | 9 - .../GridCacheAbstractLocalStoreSelfTest.java | 1 - .../GridCacheAbstractRemoveFailureTest.java | 26 +- .../cache/GridCacheClearSelfTest.java | 29 +- ...GridCacheInterceptorAtomicRebalanceTest.java | 6 - ...heInterceptorTransactionalRebalanceTest.java | 6 - .../cache/GridCacheOffheapUpdateSelfTest.java | 1 - .../cache/GridCachePutAllFailoverSelfTest.java | 58 -- .../GridCacheTtlManagerEvictionSelfTest.java | 15 +- .../GridCacheValueBytesPreloadingSelfTest.java | 8 - ...IgniteCacheAtomicPutAllFailoverSelfTest.java | 5 - .../IgniteCacheConfigVariationsFullApiTest.java | 11 +- .../IgniteCacheEntryListenerAbstractTest.java | 11 - ...niteCacheEntryListenerExpiredEventsTest.java | 11 +- ...niteCacheExpireAndUpdateConsistencyTest.java | 20 +- ...gniteCacheInvokeReadThroughAbstractTest.java | 4 - ...iteCacheInvokeReadThroughSingleNodeTest.java | 17 +- .../cache/IgniteCacheInvokeReadThroughTest.java | 21 +- .../cache/IgniteCachePeekModesAbstractTest.java | 3 - .../IgniteCacheReadThroughEvictionSelfTest.java | 1 - ...heapCacheMetricsForClusterGroupSelfTest.java | 1 - .../GridCacheQueueCleanupSelfTest.java | 2 - ...dCacheQueueMultiNodeConsistencySelfTest.java | 2 - .../IgniteCollectionAbstractTest.java | 1 - .../IgniteDataStructureUniqueNameTest.java | 2 - .../GridCacheLocalAtomicQueueApiSelfTest.java | 2 - .../local/GridCacheLocalAtomicSetSelfTest.java | 2 - .../local/GridCacheLocalQueueApiSelfTest.java | 2 - .../local/GridCacheLocalSetSelfTest.java | 2 - ...dCachePartitionedAtomicQueueApiSelfTest.java | 2 - ...ionedAtomicQueueCreateMultiNodeSelfTest.java | 2 - ...micQueueFailoverDataConsistencySelfTest.java | 2 - ...itionedAtomicQueueRotativeMultiNodeTest.java | 2 - ...chePartitionedAtomicSetFailoverSelfTest.java | 2 - ...rtitionedDataStructuresFailoverSelfTest.java | 2 - .../GridCachePartitionedQueueApiSelfTest.java | 2 - ...PartitionedQueueCreateMultiNodeSelfTest.java | 2 - ...dCachePartitionedQueueEntryMoveSelfTest.java | 2 - ...nedQueueFailoverDataConsistencySelfTest.java | 2 - ...CachePartitionedQueueJoinedNodeSelfTest.java | 2 - ...dCachePartitionedQueueMultiNodeSelfTest.java | 2 - ...hePartitionedQueueRotativeMultiNodeTest.java | 2 - ...GridCachePartitionedSetFailoverSelfTest.java | 2 - .../IgnitePartitionedQueueNoBackupsTest.java | 2 - ...eplicatedDataStructuresFailoverSelfTest.java | 2 - ...idCacheReplicatedQueueMultiNodeSelfTest.java | 2 - ...cheReplicatedQueueRotativeMultiNodeTest.java | 2 - .../GridCacheReplicatedSetSelfTest.java | 2 - .../GridCacheAbstractNodeRestartSelfTest.java | 115 +--- .../IgniteCacheAtomicNodeRestartTest.java | 5 - .../IgniteCacheTxIteratorSelfTest.java | 33 +- .../dht/IgniteCacheConcurrentPutGetRemove.java | 12 +- .../IgniteCacheCrossCacheTxFailoverTest.java | 46 +- .../IgniteCachePutRetryAbstractSelfTest.java | 45 +- .../dht/IgniteCachePutRetryAtomicSelfTest.java | 2 +- ...gniteCachePutRetryTransactionalSelfTest.java | 28 +- ...eAtomicInvalidPartitionHandlingSelfTest.java | 65 +- ...achePartitionedMultiNodeFullApiSelfTest.java | 1 - .../lru/LruNearEvictionPolicySelfTest.java | 8 - .../LruNearOnlyNearEvictionPolicySelfTest.java | 10 - .../IgniteCacheExpiryPolicyAbstractTest.java | 9 - ...LocalCacheOffHeapAndSwapMetricsSelfTest.java | 627 ------------------- .../continuous/CacheContinuousBatchAckTest.java | 1 - ...eContinuousQueryAsyncFilterListenerTest.java | 1 - .../CacheContinuousQueryOrderingEventTest.java | 1 - ...CacheKeepBinaryIterationNearEnabledTest.java | 6 +- ...acheKeepBinaryIterationStoreEnabledTest.java | 6 +- ...ridCacheContinuousQueryAbstractSelfTest.java | 10 - .../igfs/IgfsAbstractBaseSelfTest.java | 17 - .../processors/igfs/IgfsAbstractSelfTest.java | 11 - .../ignite/testframework/GridTestUtils.java | 96 --- .../configvariations/ConfigVariations.java | 10 - ...IgniteCacheConfigVariationsAbstractTest.java | 8 - .../IgniteCacheMetricsSelfTestSuite.java | 2 - .../CacheOperationsWithExpirationTest.java | 9 +- .../CacheQueryOffheapEvictDataLostTest.java | 3 - .../CacheRandomOperationsMultithreadedTest.java | 9 - .../ClientReconnectAfterClusterRestartTest.java | 1 - .../cache/GridCacheQuerySimpleBenchmark.java | 1 - .../IgniteBinaryObjectQueryArgumentsTest.java | 11 - .../cache/IgniteCacheOffheapEvictQueryTest.java | 2 - .../IgniteCacheQueryMultiThreadedSelfTest.java | 1 - .../cache/IgniteCrossCachesJoinsQueryTest.java | 6 - .../cache/ttl/CacheTtlAbstractSelfTest.java | 7 - .../ttl/CacheTtlAtomicAbstractSelfTest.java | 29 + .../cache/ttl/CacheTtlAtomicLocalSelfTest.java | 34 + .../ttl/CacheTtlAtomicPartitionedSelfTest.java | 34 + .../ttl/CacheTtlOnheapAbstractSelfTest.java | 29 - .../CacheTtlOnheapAtomicAbstractSelfTest.java | 29 - .../ttl/CacheTtlOnheapAtomicLocalSelfTest.java | 34 - ...CacheTtlOnheapAtomicPartitionedSelfTest.java | 34 - ...eTtlOnheapTransactionalAbstractSelfTest.java | 29 - ...acheTtlOnheapTransactionalLocalSelfTest.java | 34 - ...lOnheapTransactionalPartitionedSelfTest.java | 34 - .../CacheTtlTransactionalAbstractSelfTest.java | 29 + .../ttl/CacheTtlTransactionalLocalSelfTest.java | 34 + ...acheTtlTransactionalPartitionedSelfTest.java | 34 + .../IgniteCacheWithIndexingTestSuite.java | 16 +- 108 files changed, 416 insertions(+), 1984 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/5ec807a5/modules/core/src/main/java/org/apache/ignite/cache/CacheMemoryMode.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/cache/CacheMemoryMode.java b/modules/core/src/main/java/org/apache/ignite/cache/CacheMemoryMode.java index 0133327..5c840cd 100644 --- a/modules/core/src/main/java/org/apache/ignite/cache/CacheMemoryMode.java +++ b/modules/core/src/main/java/org/apache/ignite/cache/CacheMemoryMode.java @@ -23,7 +23,7 @@ import org.apache.ignite.cache.eviction.EvictionPolicy; * Defines set of memory modes. Memory modes help control whether cache entries are * stored on heap memory, offheap memory, or in swap space. */ -public enum CacheMemoryMode { +@Deprecated public enum CacheMemoryMode { /** * Entries will be stored on-heap first. The onheap tiered storage works as follows: * http://git-wip-us.apache.org/repos/asf/ignite/blob/5ec807a5/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java b/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java index 25398ca..418c7fb 100644 --- a/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java +++ b/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java @@ -1674,7 +1674,7 @@ public class CacheConfiguration extends MutableConfiguration { * * @return Memory mode. */ - public CacheMemoryMode getMemoryMode() { + @Deprecated public CacheMemoryMode getMemoryMode() { return null; } @@ -1684,7 +1684,7 @@ public class CacheConfiguration extends MutableConfiguration { * @param memMode Memory mode. * @return {@code this} for chaining. */ - public CacheConfiguration setMemoryMode(CacheMemoryMode memMode) { + @Deprecated public CacheConfiguration setMemoryMode(CacheMemoryMode memMode) { //this.memMode = memMode; return this; http://git-wip-us.apache.org/repos/asf/ignite/blob/5ec807a5/modules/core/src/main/java/org/apache/ignite/configuration/CollectionConfiguration.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/configuration/CollectionConfiguration.java b/modules/core/src/main/java/org/apache/ignite/configuration/CollectionConfiguration.java index 4aa60a1..e92b8a7 100644 --- a/modules/core/src/main/java/org/apache/ignite/configuration/CollectionConfiguration.java +++ b/modules/core/src/main/java/org/apache/ignite/configuration/CollectionConfiguration.java @@ -100,14 +100,14 @@ public class CollectionConfiguration implements Serializable { /** * @return Cache memory mode. */ - public CacheMemoryMode getMemoryMode() { + @Deprecated public CacheMemoryMode getMemoryMode() { return null; } /** * @param memoryMode Memory mode. */ - public void setMemoryMode(CacheMemoryMode memoryMode) { + @Deprecated public void setMemoryMode(CacheMemoryMode memoryMode) { } /** http://git-wip-us.apache.org/repos/asf/ignite/blob/5ec807a5/modules/core/src/test/java/org/apache/ignite/internal/ClusterNodeMetricsSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/ClusterNodeMetricsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/ClusterNodeMetricsSelfTest.java index 04b8985..35b3def 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/ClusterNodeMetricsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/ClusterNodeMetricsSelfTest.java @@ -23,7 +23,6 @@ import java.util.concurrent.CountDownLatch; import org.apache.ignite.GridTestTask; import org.apache.ignite.Ignite; import org.apache.ignite.IgniteCache; -import org.apache.ignite.cache.CacheMemoryMode; import org.apache.ignite.cache.eviction.fifo.FifoEvictionPolicy; import org.apache.ignite.cluster.ClusterMetrics; import org.apache.ignite.configuration.CacheConfiguration; @@ -62,8 +61,8 @@ public class ClusterNodeMetricsSelfTest extends GridCommonAbstractTest { /** Amount of cache entries. */ private static final int MAX_VALS_AMOUNT = 400; - /** With ONHEAP_TIERED policy. */ - private final String ON_HEAP_TIERED_NAME = "onHeapTieredCfg"; + /** Cache name. */ + private final String CACHE_NAME = "cache1"; /** {@inheritDoc} */ @Override protected void beforeTest() throws Exception { @@ -88,19 +87,18 @@ public class ClusterNodeMetricsSelfTest extends GridCommonAbstractTest { cfg.setCacheConfiguration(); cfg.setMetricsUpdateFrequency(0); - CacheConfiguration onHeapTieredCfg = defaultCacheConfiguration(); - onHeapTieredCfg.setName(ON_HEAP_TIERED_NAME); - onHeapTieredCfg.setStatisticsEnabled(true); - onHeapTieredCfg.setMemoryMode(CacheMemoryMode.ONHEAP_TIERED); - onHeapTieredCfg.setOffHeapMaxMemory(MAX_VALS_AMOUNT * VAL_SIZE); + CacheConfiguration ccfg = defaultCacheConfiguration(); + ccfg.setName(CACHE_NAME); + ccfg.setStatisticsEnabled(true); + ccfg.setOffHeapMaxMemory(MAX_VALS_AMOUNT * VAL_SIZE); FifoEvictionPolicy plc = new FifoEvictionPolicy(); plc.setMaxMemorySize(MAX_VALS_AMOUNT * VAL_SIZE); plc.setMaxSize(0); - onHeapTieredCfg.setEvictionPolicy(plc); + ccfg.setEvictionPolicy(plc); - return cfg.setCacheConfiguration(onHeapTieredCfg); + return cfg.setCacheConfiguration(ccfg); } /** @@ -111,25 +109,25 @@ public class ClusterNodeMetricsSelfTest extends GridCommonAbstractTest { Ignite ignite = grid(); - final IgniteCache onHeapCache = ignite.getOrCreateCache(ON_HEAP_TIERED_NAME); + final IgniteCache cache = ignite.getOrCreateCache(CACHE_NAME); - long prevTieredOffHeapSize = onHeapCache.metrics().getOffHeapAllocatedSize(); + long prevTieredOffHeapSize = cache.metrics().getOffHeapAllocatedSize(); assertEquals(0, prevTieredOffHeapSize); long prevClusterNonHeapMemoryUsed = ignite.cluster().metrics().getNonHeapMemoryUsed(); - fillCache(onHeapCache); + fillCache(cache); - assertTrue(onHeapCache.metrics().getOffHeapAllocatedSize() > (MAX_VALS_AMOUNT - 5) + assertTrue(cache.metrics().getOffHeapAllocatedSize() > (MAX_VALS_AMOUNT - 5) * VAL_SIZE + prevTieredOffHeapSize); assertTrue(prevClusterNonHeapMemoryUsed < ignite.cluster().metrics().getNonHeapMemoryUsed()); prevClusterNonHeapMemoryUsed = ignite.cluster().metrics().getNonHeapMemoryUsed(); - prevTieredOffHeapSize = onHeapCache.metrics().getOffHeapAllocatedSize(); + prevTieredOffHeapSize = cache.metrics().getOffHeapAllocatedSize(); - assertEquals(prevTieredOffHeapSize, onHeapCache.metrics().getOffHeapAllocatedSize()); + assertEquals(prevTieredOffHeapSize, cache.metrics().getOffHeapAllocatedSize()); assertTrue((MAX_VALS_AMOUNT - 5) * VAL_SIZE + prevClusterNonHeapMemoryUsed < ignite.cluster().metrics().getNonHeapMemoryUsed()); } http://git-wip-us.apache.org/repos/asf/ignite/blob/5ec807a5/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheNearReaderUpdateTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheNearReaderUpdateTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheNearReaderUpdateTest.java index 4ea74ca..5dd2e2a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheNearReaderUpdateTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheNearReaderUpdateTest.java @@ -145,17 +145,6 @@ public class CacheNearReaderUpdateTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ - public void testOneBackupOffheap() throws Exception { - CacheConfiguration ccfg = cacheConfiguration(PARTITIONED, FULL_SYNC, 1, false, false); - - GridTestUtils.setMemoryMode(null, ccfg, GridTestUtils.TestMemoryMode.OFFHEAP_TIERED, 0, 0); - - testGetUpdateMultithreaded(ccfg); - } - - /** - * @throws Exception If failed. - */ public void testGetUpdateMultithreaded(CacheConfiguration ccfg) throws Exception { final List putNodes = new ArrayList<>(); http://git-wip-us.apache.org/repos/asf/ignite/blob/5ec807a5/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheOffheapMapEntrySelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheOffheapMapEntrySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheOffheapMapEntrySelfTest.java index 0f09c56..06fafb3 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheOffheapMapEntrySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheOffheapMapEntrySelfTest.java @@ -19,7 +19,6 @@ package org.apache.ignite.internal.processors.cache; import org.apache.ignite.IgniteCache; import org.apache.ignite.cache.CacheAtomicityMode; -import org.apache.ignite.cache.CacheMemoryMode; import org.apache.ignite.cache.CacheMode; import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.internal.IgniteKernal; @@ -30,7 +29,6 @@ import org.apache.ignite.internal.processors.cache.local.GridLocalCacheEntry; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; -import static org.apache.ignite.cache.CacheMemoryMode.ONHEAP_TIERED; import static org.apache.ignite.cache.CacheMode.LOCAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; import static org.apache.ignite.cache.CacheMode.REPLICATED; @@ -65,26 +63,23 @@ public class CacheOffheapMapEntrySelfTest extends GridCacheAbstractSelfTest { } /** - * @param igniteInstanceName Ignite instance name. - * @param memoryMode Memory mode. + * @param gridName Grid name. * @param atomicityMode Atomicity mode. * @param cacheMode Cache mode. * @param cacheName Cache name. * @return Cache configuration. * @throws Exception If failed. */ - private CacheConfiguration cacheConfiguration(String igniteInstanceName, - CacheMemoryMode memoryMode, + private CacheConfiguration cacheConfiguration(String gridName, CacheAtomicityMode atomicityMode, CacheMode cacheMode, String cacheName) throws Exception { - CacheConfiguration cfg = super.cacheConfiguration(igniteInstanceName); + CacheConfiguration cfg = super.cacheConfiguration(gridName); cfg.setCacheMode(cacheMode); cfg.setAtomicityMode(atomicityMode); - cfg.setMemoryMode(memoryMode); cfg.setName(cacheName); return cfg; @@ -94,38 +89,33 @@ public class CacheOffheapMapEntrySelfTest extends GridCacheAbstractSelfTest { * @throws Exception If failed. */ public void testCacheMapEntry() throws Exception { - checkCacheMapEntry(ONHEAP_TIERED, ATOMIC, LOCAL, GridLocalCacheEntry.class); + checkCacheMapEntry(ATOMIC, LOCAL, GridLocalCacheEntry.class); - checkCacheMapEntry(ONHEAP_TIERED, TRANSACTIONAL, LOCAL, GridLocalCacheEntry.class); + checkCacheMapEntry(TRANSACTIONAL, LOCAL, GridLocalCacheEntry.class); - checkCacheMapEntry(ONHEAP_TIERED, ATOMIC, PARTITIONED, GridNearCacheEntry.class); + checkCacheMapEntry(ATOMIC, PARTITIONED, GridNearCacheEntry.class); - checkCacheMapEntry(ONHEAP_TIERED, TRANSACTIONAL, PARTITIONED, GridNearCacheEntry.class); + checkCacheMapEntry(TRANSACTIONAL, PARTITIONED, GridNearCacheEntry.class); - checkCacheMapEntry(ONHEAP_TIERED, ATOMIC, REPLICATED, GridDhtAtomicCacheEntry.class); + checkCacheMapEntry(ATOMIC, REPLICATED, GridDhtAtomicCacheEntry.class); - checkCacheMapEntry(ONHEAP_TIERED, TRANSACTIONAL, REPLICATED, GridDhtColocatedCacheEntry.class); + checkCacheMapEntry(TRANSACTIONAL, REPLICATED, GridDhtColocatedCacheEntry.class); } /** - * @param memoryMode Cache memory mode. * @param atomicityMode Cache atomicity mode. * @param cacheMode Cache mode. * @param entryCls Class of cache map entry. * @throws Exception If failed. */ - private void checkCacheMapEntry(CacheMemoryMode memoryMode, - CacheAtomicityMode atomicityMode, + private void checkCacheMapEntry(CacheAtomicityMode atomicityMode, CacheMode cacheMode, Class entryCls) throws Exception { - log.info("Test cache [memMode=" + memoryMode + - ", atomicityMode=" + atomicityMode + - ", cacheMode=" + cacheMode + ']'); + log.info("Test cache [atomicityMode=" + atomicityMode + ", cacheMode=" + cacheMode + ']'); CacheConfiguration cfg = cacheConfiguration(grid(0).name(), - memoryMode, atomicityMode, cacheMode, "Cache"); http://git-wip-us.apache.org/repos/asf/ignite/blob/5ec807a5/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CachePutEventListenerErrorSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CachePutEventListenerErrorSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CachePutEventListenerErrorSelfTest.java index 272c3e4..4ad4b51 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CachePutEventListenerErrorSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CachePutEventListenerErrorSelfTest.java @@ -23,7 +23,6 @@ import org.apache.ignite.Ignite; import org.apache.ignite.IgniteCache; import org.apache.ignite.Ignition; import org.apache.ignite.cache.CacheAtomicityMode; -import org.apache.ignite.cache.CacheMemoryMode; import org.apache.ignite.cache.CacheMode; import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.configuration.IgniteConfiguration; @@ -95,37 +94,36 @@ public class CachePutEventListenerErrorSelfTest extends GridCommonAbstractTest { * @throws Exception If failed. */ public void testPartitionedAtomicOnHeap() throws Exception { - doTest(CacheMode.PARTITIONED, CacheAtomicityMode.ATOMIC, CacheMemoryMode.ONHEAP_TIERED); + doTest(CacheMode.PARTITIONED, CacheAtomicityMode.ATOMIC); } /** * @throws Exception If failed. */ public void testPartitionedTransactionalOnHeap() throws Exception { - doTest(CacheMode.PARTITIONED, CacheAtomicityMode.TRANSACTIONAL, CacheMemoryMode.ONHEAP_TIERED); + doTest(CacheMode.PARTITIONED, CacheAtomicityMode.TRANSACTIONAL); } /** * @throws Exception If failed. */ public void testReplicatedAtomicOnHeap() throws Exception { - doTest(CacheMode.REPLICATED, CacheAtomicityMode.ATOMIC, CacheMemoryMode.ONHEAP_TIERED); + doTest(CacheMode.REPLICATED, CacheAtomicityMode.ATOMIC); } /** * @throws Exception If failed. */ public void testReplicatedTransactionalOnHeap() throws Exception { - doTest(CacheMode.REPLICATED, CacheAtomicityMode.TRANSACTIONAL, CacheMemoryMode.ONHEAP_TIERED); + doTest(CacheMode.REPLICATED, CacheAtomicityMode.TRANSACTIONAL); } /** * @param cacheMode Cache mode. * @param atomicityMode Atomicity mode. - * @param memMode Memory mode. * @throws Exception If failed. */ - private void doTest(CacheMode cacheMode, CacheAtomicityMode atomicityMode, CacheMemoryMode memMode) + private void doTest(CacheMode cacheMode, CacheAtomicityMode atomicityMode) throws Exception { Ignite ignite = grid("client"); @@ -135,7 +133,6 @@ public class CachePutEventListenerErrorSelfTest extends GridCommonAbstractTest { cfg.setName("cache"); cfg.setCacheMode(cacheMode); cfg.setAtomicityMode(atomicityMode); - cfg.setMemoryMode(memMode); IgniteCache cache = ignite.createCache(cfg).withAsync(); http://git-wip-us.apache.org/repos/asf/ignite/blob/5ec807a5/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheSerializableTransactionsTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheSerializableTransactionsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheSerializableTransactionsTest.java index 251e171..f3a39c3 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheSerializableTransactionsTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheSerializableTransactionsTest.java @@ -51,6 +51,7 @@ import org.apache.ignite.IgniteTransactions; import org.apache.ignite.cache.CacheEntry; import org.apache.ignite.cache.CacheMode; import org.apache.ignite.cache.CacheWriteSynchronizationMode; +import org.apache.ignite.cache.eviction.lru.LruEvictionPolicy; import org.apache.ignite.cache.store.CacheStore; import org.apache.ignite.cache.store.CacheStoreAdapter; import org.apache.ignite.configuration.CacheConfiguration; @@ -82,7 +83,6 @@ import static org.apache.ignite.cache.CacheMode.PARTITIONED; import static org.apache.ignite.cache.CacheMode.REPLICATED; import static org.apache.ignite.cache.CacheRebalanceMode.SYNC; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; -import static org.apache.ignite.testframework.GridTestUtils.TestMemoryMode; import static org.apache.ignite.testframework.GridTestUtils.runMultiThreadedAsync; import static org.apache.ignite.transactions.TransactionConcurrency.OPTIMISTIC; import static org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC; @@ -2578,8 +2578,7 @@ public class CacheSerializableTransactionsTest extends GridCommonAbstractTest { String readCacheName, String writeCacheName, final boolean entry, - final AtomicInteger putKey) throws Exception - { + final AtomicInteger putKey) throws Exception { final int THREADS = 64; final IgniteCache readCache = ignite.cache(readCacheName); @@ -3065,7 +3064,7 @@ public class CacheSerializableTransactionsTest extends GridCommonAbstractTest { } try (Transaction tx = client2.transactions().txStart(OPTIMISTIC, SERIALIZABLE)) { - assertEquals(1, (Object) cache2.get(key)); + assertEquals(1, (Object)cache2.get(key)); cache2.put(key, 2); tx.commit(); @@ -3266,7 +3265,7 @@ public class CacheSerializableTransactionsTest extends GridCommonAbstractTest { ignite0.createCache(ccfg1); - CacheConfiguration ccfg2= + CacheConfiguration ccfg2 = cacheConfiguration(PARTITIONED, FULL_SYNC, 1, false, false); ccfg2.setName(CACHE2); @@ -4008,42 +4007,35 @@ public class CacheSerializableTransactionsTest extends GridCommonAbstractTest { * @throws Exception If failed. */ public void testAccountTx1() throws Exception { - accountTx(false, false, false, false, TestMemoryMode.HEAP); + accountTx(false, false, false, false); } /** * @throws Exception If failed. */ public void testAccountTx2() throws Exception { - accountTx(true, false, false, false, TestMemoryMode.HEAP); + accountTx(true, false, false, false); } /** * @throws Exception If failed. */ public void testAccountTxWithNonSerializable() throws Exception { - accountTx(false, false, true, false, TestMemoryMode.HEAP); + accountTx(false, false, true, false); } /** * @throws Exception If failed. */ public void testAccountTxNearCache() throws Exception { - accountTx(false, true, false, false, TestMemoryMode.HEAP); - } - - /** - * @throws Exception If failed. - */ - public void testAccountTxOffheapTiered() throws Exception { - accountTx(false, false, false, false, TestMemoryMode.OFFHEAP_TIERED); + accountTx(false, true, false, false); } /** * @throws Exception If failed. */ public void testAccountTxNodeRestart() throws Exception { - accountTx(false, false, false, true, TestMemoryMode.HEAP); + accountTx(false, false, false, true); } /** @@ -4051,20 +4043,16 @@ public class CacheSerializableTransactionsTest extends GridCommonAbstractTest { * @param nearCache If {@code true} near cache is enabled. * @param nonSer If {@code true} starts threads executing non-serializable transactions. * @param restart If {@code true} restarts one node. - * @param memMode Test memory mode. * @throws Exception If failed. */ private void accountTx(final boolean getAll, final boolean nearCache, final boolean nonSer, - final boolean restart, - TestMemoryMode memMode) throws Exception { + final boolean restart) throws Exception { final Ignite srv = ignite(1); CacheConfiguration ccfg = cacheConfiguration(PARTITIONED, FULL_SYNC, 1, false, false); - GridTestUtils.setMemoryMode(null, ccfg, memMode, 1, 64); - final String cacheName = srv.createCache(ccfg).getName(); try { @@ -4346,12 +4334,16 @@ public class CacheSerializableTransactionsTest extends GridCommonAbstractTest { } { - // Offheap. + // Eviction. CacheConfiguration ccfg = cacheConfiguration(PARTITIONED, FULL_SYNC, 1, false, false); ccfg.setName("cache3"); ccfg.setRebalanceMode(SYNC); - GridTestUtils.setMemoryMode(null, ccfg, TestMemoryMode.OFFHEAP_TIERED, 1, 64); + LruEvictionPolicy plc = new LruEvictionPolicy(); + + plc.setMaxSize(100); + + ccfg.setEvictionPolicy(plc); srv.createCache(ccfg); @@ -4542,7 +4534,7 @@ public class CacheSerializableTransactionsTest extends GridCommonAbstractTest { } } finally { - destroyCache(cacheName); + destroyCache(cacheName); } } @@ -4881,15 +4873,6 @@ public class CacheSerializableTransactionsTest extends GridCommonAbstractTest { ccfgs.add(cacheConfiguration(PARTITIONED, FULL_SYNC, 1, true, true)); ccfgs.add(cacheConfiguration(PARTITIONED, FULL_SYNC, 2, true, true)); - // Swap and offheap enabled. - for (GridTestUtils.TestMemoryMode memMode : GridTestUtils.TestMemoryMode.values()) { - CacheConfiguration ccfg = cacheConfiguration(PARTITIONED, FULL_SYNC, 1, false, false); - - GridTestUtils.setMemoryMode(null, ccfg, memMode, 1, 64); - - ccfgs.add(ccfg); - } - return ccfgs; } @@ -4903,7 +4886,7 @@ public class CacheSerializableTransactionsTest extends GridCommonAbstractTest { ", near=" + (ccfg.getNearConfiguration() != null) + ", store=" + ccfg.isWriteThrough() + ", evictPlc=" + (ccfg.getEvictionPolicy() != null) + - ", maxOffheap=" + ccfg.getOffHeapMaxMemory() + + ", maxOffheap=" + ccfg.getOffHeapMaxMemory() + ']'); } http://git-wip-us.apache.org/repos/asf/ignite/blob/5ec807a5/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheSwapUnswapGetTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheSwapUnswapGetTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheSwapUnswapGetTest.java deleted file mode 100644 index cb97fed..0000000 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheSwapUnswapGetTest.java +++ /dev/null @@ -1,270 +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; - -import java.util.Collections; -import java.util.concurrent.Callable; -import java.util.concurrent.ThreadLocalRandom; -import java.util.concurrent.atomic.AtomicBoolean; -import org.apache.ignite.Ignite; -import org.apache.ignite.IgniteCache; -import org.apache.ignite.IgniteCheckedException; -import org.apache.ignite.cache.CacheAtomicityMode; -import org.apache.ignite.cache.CacheMemoryMode; -import org.apache.ignite.cache.CachePeekMode; -import org.apache.ignite.cache.eviction.lru.LruEvictionPolicy; -import org.apache.ignite.configuration.CacheConfiguration; -import org.apache.ignite.configuration.IgniteConfiguration; -import org.apache.ignite.internal.IgniteInternalFuture; -import org.apache.ignite.internal.util.typedef.CAX; -import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; -import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; -import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; -import org.apache.ignite.testframework.GridTestUtils; -import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; -import org.eclipse.jetty.util.ConcurrentHashSet; - -import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; -import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; -import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; - -/** - * - */ -public class CacheSwapUnswapGetTest extends GridCommonAbstractTest { - /** */ - private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); - - /** */ - private static final long DURATION = 30_000; - - /** */ - private static final long OFFHEAP_MEM = 1000; - - /** */ - private static final int MAX_HEAP_SIZE = 100; - - /** {@inheritDoc} */ - @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { - IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); - - ((TcpDiscoverySpi)cfg.getDiscoverySpi()).setIpFinder(ipFinder); - - return cfg; - } - - /** - * @param atomicityMode Cache atomicity mode. - * @param memMode Cache memory mode. - * @param swap {@code True} if swap enabled. - * @return Cache configuration. - */ - private CacheConfiguration cacheConfiguration(CacheAtomicityMode atomicityMode, - CacheMemoryMode memMode, - boolean swap) { - CacheConfiguration ccfg = new CacheConfiguration<>(); - - ccfg.setAtomicityMode(atomicityMode); - ccfg.setWriteSynchronizationMode(FULL_SYNC); - ccfg.setMemoryMode(memMode); - - if (memMode == CacheMemoryMode.ONHEAP_TIERED) { - LruEvictionPolicy plc = new LruEvictionPolicy(); - plc.setMaxSize(MAX_HEAP_SIZE); - - ccfg.setEvictionPolicy(plc); - } - - // TODO GG-11148. -// if (swap) { -// ccfg.setSwapEnabled(true); -// -// ccfg.setOffHeapMaxMemory(OFFHEAP_MEM); -// } -// else -// ccfg.setOffHeapMaxMemory(0); - - return ccfg; - } - - /** {@inheritDoc} */ - @Override protected void beforeTestsStarted() throws Exception { - super.beforeTestsStarted(); - - startGrid(0); - } - - /** {@inheritDoc} */ - @Override protected void afterTestsStopped() throws Exception { - super.afterTestsStopped(); - - stopAllGrids(); - } - - /** {@inheritDoc} */ - @Override protected long getTestTimeout() { - return DURATION + 60_000; - } - - /** - * @throws Exception If failed. - */ - public void testTxCacheOffheapEvict() throws Exception { - swapUnswap(TRANSACTIONAL, CacheMemoryMode.ONHEAP_TIERED, false); - } - - /** - * @throws Exception If failed. - */ - public void testTxCacheOffheapSwapEvict() throws Exception { - swapUnswap(TRANSACTIONAL, CacheMemoryMode.ONHEAP_TIERED, true); - } - - /** - * @throws Exception If failed. - */ - public void testAtomicCacheOffheapEvict() throws Exception { - swapUnswap(ATOMIC, CacheMemoryMode.ONHEAP_TIERED, false); - } - - /** - * @throws Exception If failed. - */ - public void testAtomicCacheOffheapSwapEvict() throws Exception { - swapUnswap(ATOMIC, CacheMemoryMode.ONHEAP_TIERED, true); - } - - /** - * @param atomicityMode Cache atomicity mode. - * @param memMode Cache memory mode. - * @param swap {@code True} if swap enabled. - * @throws Exception If failed. - */ - private void swapUnswap(CacheAtomicityMode atomicityMode, CacheMemoryMode memMode, boolean swap) throws Exception { - log.info("Start test [mode=" + atomicityMode + ", swap=" + swap + ']'); - - int threadCnt = 20; - final int keyCnt = 1000; - final int valCnt = 10000; - - final Ignite g = grid(0); - - final ConcurrentHashSet keys = new ConcurrentHashSet<>(); - - final AtomicBoolean done = new AtomicBoolean(); - - g.destroyCache(null); - - final IgniteCache cache = g.createCache(cacheConfiguration(atomicityMode, memMode, swap)); - - try { - IgniteInternalFuture fut = multithreadedAsync(new CAX() { - @Override public void applyx() throws IgniteCheckedException { - ThreadLocalRandom rnd = ThreadLocalRandom.current(); - - while (!done.get()) { - Integer key = rnd.nextInt(keyCnt); - - switch (rnd.nextInt(3)) { - case 0: - cache.put(key, String.valueOf(rnd.nextInt(valCnt))); - - keys.add(key); - - break; - - case 1: - cache.localEvict(Collections.singletonList(key)); - - break; - - case 2: - if (keys.contains(key)) { - String val = cache.get(key); - - assertNotNull(val); - } - - break; - - default: - assert false; - } - } - } - }, threadCnt, "update-thread"); - - IgniteInternalFuture getFut = GridTestUtils.runAsync(new Callable() { - @Override public Void call() throws Exception { - Thread.currentThread().setName("get-thread"); - - while (!done.get()) { - for (Integer key : keys) { - String val = cache.get(key); - - assertNotNull(val); - } - } - - return null; - } - }); - - long endTime = System.currentTimeMillis() + DURATION; - - while (System.currentTimeMillis() < endTime) { - Thread.sleep(5000); - - log.info("Cache size [heap=" + cache.localSize(CachePeekMode.ONHEAP) + - ", offheap=" + cache.localSize(CachePeekMode.OFFHEAP) + - ", total=" + cache.localSize() + - ", offheapMem=" + cache.localMetrics().getOffHeapAllocatedSize() + ']'); - } - - done.set(true); - - fut.get(); - getFut.get(); - - for (Integer key : keys) { - String val = cache.get(key); - - assertNotNull(val); - } - - int onheapSize = cache.localSize(CachePeekMode.ONHEAP); - int offheapSize = cache.localSize(CachePeekMode.OFFHEAP); - int total = cache.localSize(); - long offheapMem = cache.localMetrics().getOffHeapAllocatedSize(); - - log.info("Cache size [heap=" + onheapSize + - ", offheap=" + offheapSize + - ", total=" + total + - ", offheapMem=" + offheapMem + ']'); - - assertTrue(total > 0); - - assertEquals(offheapSize, total); - - assertEquals(MAX_HEAP_SIZE, onheapSize); - } - finally { - done.set(true); - } - } -} http://git-wip-us.apache.org/repos/asf/ignite/blob/5ec807a5/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridAbstractCacheInterceptorRebalanceTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridAbstractCacheInterceptorRebalanceTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridAbstractCacheInterceptorRebalanceTest.java index b7d7170..3f9e531 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridAbstractCacheInterceptorRebalanceTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridAbstractCacheInterceptorRebalanceTest.java @@ -28,7 +28,6 @@ import org.apache.ignite.IgniteCache; import org.apache.ignite.cache.CacheAtomicityMode; import org.apache.ignite.cache.CacheInterceptor; import org.apache.ignite.cache.CacheInterceptorAdapter; -import org.apache.ignite.cache.CacheMemoryMode; import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.internal.IgniteEx; @@ -101,11 +100,6 @@ public abstract class GridAbstractCacheInterceptorRebalanceTest extends GridComm */ protected abstract CacheAtomicityMode atomicityMode(); - /** - * @return Cache memory mode; - */ - protected abstract CacheMemoryMode memoryMode(); - /** {@inheritDoc} */ @Override protected void afterTest() throws Exception { stopAllGrids(); http://git-wip-us.apache.org/repos/asf/ignite/blob/5ec807a5/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java index 7b333ea..f58435a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java @@ -59,7 +59,6 @@ import org.apache.ignite.IgniteLogger; import org.apache.ignite.IgniteTransactions; import org.apache.ignite.cache.CacheEntry; import org.apache.ignite.cache.CacheEntryProcessor; -import org.apache.ignite.cache.CacheMemoryMode; import org.apache.ignite.cache.CachePeekMode; import org.apache.ignite.cache.affinity.Affinity; import org.apache.ignite.cache.query.QueryCursor; @@ -108,7 +107,6 @@ import static java.util.concurrent.TimeUnit.MILLISECONDS; import static org.apache.ignite.cache.CacheAtomicWriteOrderMode.CLOCK; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; -import static org.apache.ignite.cache.CacheMemoryMode.ONHEAP_TIERED; import static org.apache.ignite.cache.CacheMode.LOCAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; import static org.apache.ignite.cache.CacheMode.REPLICATED; @@ -199,13 +197,6 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract return true; } - /** - * @return {@code True} if values should be stored off-heap. - */ - protected CacheMemoryMode memoryMode() { - return ONHEAP_TIERED; - } - /** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); http://git-wip-us.apache.org/repos/asf/ignite/blob/5ec807a5/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractLocalStoreSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractLocalStoreSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractLocalStoreSelfTest.java index 315e228..489a77d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractLocalStoreSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractLocalStoreSelfTest.java @@ -37,7 +37,6 @@ import org.apache.ignite.IgniteCache; import org.apache.ignite.IgniteSystemProperties; import org.apache.ignite.Ignition; import org.apache.ignite.cache.CacheAtomicityMode; -import org.apache.ignite.cache.CacheMemoryMode; import org.apache.ignite.cache.CacheMode; import org.apache.ignite.cache.CachePeekMode; import org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction; http://git-wip-us.apache.org/repos/asf/ignite/blob/5ec807a5/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractRemoveFailureTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractRemoveFailureTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractRemoveFailureTest.java index bda0606..8606f7c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractRemoveFailureTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractRemoveFailureTest.java @@ -164,7 +164,7 @@ public abstract class GridCacheAbstractRemoveFailureTest extends GridCommonAbstr * @throws Exception If failed. */ public void testPutAndRemove() throws Exception { - putAndRemove(DUR, null, null, GridTestUtils.TestMemoryMode.HEAP); + putAndRemove(DUR, null, null); } /** @@ -174,7 +174,7 @@ public abstract class GridCacheAbstractRemoveFailureTest extends GridCommonAbstr if (atomicityMode() != CacheAtomicityMode.TRANSACTIONAL) return; - putAndRemove(30_000, PESSIMISTIC, REPEATABLE_READ, GridTestUtils.TestMemoryMode.HEAP); + putAndRemove(30_000, PESSIMISTIC, REPEATABLE_READ); } /** @@ -184,34 +184,18 @@ public abstract class GridCacheAbstractRemoveFailureTest extends GridCommonAbstr if (atomicityMode() != CacheAtomicityMode.TRANSACTIONAL) return; - putAndRemove(30_000, OPTIMISTIC, SERIALIZABLE, GridTestUtils.TestMemoryMode.HEAP); - } - - /** - * @throws Exception If failed. - */ - public void testPutAndRemoveOffheapEvict() throws Exception { - putAndRemove(30_000, null, null, GridTestUtils.TestMemoryMode.OFFHEAP_EVICT); - } - - /** - * @throws Exception If failed. - */ - public void testPutAndRemoveOffheapEvictSwap() throws Exception { - putAndRemove(30_000, null, null, GridTestUtils.TestMemoryMode.OFFHEAP_EVICT_SWAP); + putAndRemove(30_000, OPTIMISTIC, SERIALIZABLE); } /** * @param duration Test duration. * @param txConcurrency Transaction concurrency if test explicit transaction. * @param txIsolation Transaction isolation if test explicit transaction. - * @param memMode Memory mode. * @throws Exception If failed. */ private void putAndRemove(long duration, final TransactionConcurrency txConcurrency, - final TransactionIsolation txIsolation, - GridTestUtils.TestMemoryMode memMode) throws Exception { + final TransactionIsolation txIsolation) throws Exception { assertEquals(testClientNode(), (boolean) grid(0).configuration().isClientMode()); grid(0).destroyCache(null); @@ -229,8 +213,6 @@ public abstract class GridCacheAbstractRemoveFailureTest extends GridCommonAbstr ccfg.setAtomicWriteOrderMode(atomicWriteOrderMode()); ccfg.setNearConfiguration(nearCache()); - GridTestUtils.setMemoryMode(null, ccfg, memMode, 100, 1024); - final IgniteCache sndCache0 = grid(0).createCache(ccfg); final AtomicBoolean stop = new AtomicBoolean(); http://git-wip-us.apache.org/repos/asf/ignite/blob/5ec807a5/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheClearSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheClearSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheClearSelfTest.java index a7751d4..707e275 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheClearSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheClearSelfTest.java @@ -23,7 +23,6 @@ import java.util.UUID; import org.apache.ignite.Ignite; import org.apache.ignite.IgniteCache; import org.apache.ignite.Ignition; -import org.apache.ignite.cache.CacheMemoryMode; import org.apache.ignite.cache.CacheMode; import org.apache.ignite.cache.CachePeekMode; import org.apache.ignite.configuration.CacheConfiguration; @@ -80,93 +79,92 @@ public class GridCacheClearSelfTest extends GridCommonAbstractTest { * @throws Exception If failed. */ public void testClearPartitioned() throws Exception { - testClear(CacheMode.PARTITIONED, CacheMemoryMode.ONHEAP_TIERED, false, null); + testClear(CacheMode.PARTITIONED, false, null); } /** * @throws Exception If failed. */ public void testClearPartitionedNear() throws Exception { - testClear(CacheMode.PARTITIONED, CacheMemoryMode.ONHEAP_TIERED, true, null); + testClear(CacheMode.PARTITIONED, true, null); } /** * @throws Exception If failed. */ public void testClearReplicated() throws Exception { - testClear(CacheMode.REPLICATED, CacheMemoryMode.ONHEAP_TIERED, false, null); + testClear(CacheMode.REPLICATED, false, null); } /** * @throws Exception If failed. */ public void testClearReplicatedNear() throws Exception { - testClear(CacheMode.REPLICATED, CacheMemoryMode.ONHEAP_TIERED, true, null); + testClear(CacheMode.REPLICATED, true, null); } /** * @throws Exception If failed. */ public void testClearKeyPartitioned() throws Exception { - testClear(CacheMode.PARTITIONED, CacheMemoryMode.ONHEAP_TIERED, false, Collections.singleton(3)); + testClear(CacheMode.PARTITIONED, false, Collections.singleton(3)); } /** * @throws Exception If failed. */ public void testClearKeyPartitionedNear() throws Exception { - testClear(CacheMode.PARTITIONED, CacheMemoryMode.ONHEAP_TIERED, true, Collections.singleton(3)); + testClear(CacheMode.PARTITIONED, true, Collections.singleton(3)); } /** * @throws Exception If failed. */ public void testClearKeyReplicated() throws Exception { - testClear(CacheMode.REPLICATED, CacheMemoryMode.ONHEAP_TIERED, false, Collections.singleton(3)); + testClear(CacheMode.REPLICATED, false, Collections.singleton(3)); } /** * @throws Exception If failed. */ public void testClearKeyReplicatedNear() throws Exception { - testClear(CacheMode.REPLICATED, CacheMemoryMode.ONHEAP_TIERED, true, Collections.singleton(3)); + testClear(CacheMode.REPLICATED, true, Collections.singleton(3)); } /** * @throws Exception If failed. */ public void testClearKeysPartitioned() throws Exception { - testClear(CacheMode.PARTITIONED, CacheMemoryMode.ONHEAP_TIERED, false, F.asSet(2, 6, 9)); + testClear(CacheMode.PARTITIONED, false, F.asSet(2, 6, 9)); } /** * @throws Exception If failed. */ public void testClearKeysPartitionedNear() throws Exception { - testClear(CacheMode.PARTITIONED, CacheMemoryMode.ONHEAP_TIERED, true, F.asSet(2, 6, 9)); + testClear(CacheMode.PARTITIONED, true, F.asSet(2, 6, 9)); } /** * @throws Exception If failed. */ public void testClearKeysReplicated() throws Exception { - testClear(CacheMode.REPLICATED, CacheMemoryMode.ONHEAP_TIERED, false, F.asSet(2, 6, 9)); + testClear(CacheMode.REPLICATED, false, F.asSet(2, 6, 9)); } /** * @throws Exception If failed. */ public void testClearKeysReplicatedNear() throws Exception { - testClear(CacheMode.REPLICATED, CacheMemoryMode.ONHEAP_TIERED, true, F.asSet(2, 6, 9)); + testClear(CacheMode.REPLICATED, true, F.asSet(2, 6, 9)); } /** * @param cacheMode Cache mode. - * @param memMode Memory mode. * @param near Near cache flag. * @param keys Keys to clear. */ - private void testClear(CacheMode cacheMode, CacheMemoryMode memMode, boolean near, @Nullable Set keys) { + private void testClear(CacheMode cacheMode, boolean near, @Nullable Set keys) { Ignite client1 = client1(); Ignite client2 = client2(); @@ -177,7 +175,6 @@ public class GridCacheClearSelfTest extends GridCommonAbstractTest { CacheConfiguration cfg = new CacheConfiguration<>(cacheName); cfg.setCacheMode(cacheMode); - cfg.setMemoryMode(memMode); IgniteCache cache1 = near ? client1.createCache(cfg, new NearCacheConfiguration()) : http://git-wip-us.apache.org/repos/asf/ignite/blob/5ec807a5/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheInterceptorAtomicRebalanceTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheInterceptorAtomicRebalanceTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheInterceptorAtomicRebalanceTest.java index aaeda4b..909810f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheInterceptorAtomicRebalanceTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheInterceptorAtomicRebalanceTest.java @@ -18,7 +18,6 @@ package org.apache.ignite.internal.processors.cache; import org.apache.ignite.cache.CacheAtomicityMode; -import org.apache.ignite.cache.CacheMemoryMode; /** * @@ -28,9 +27,4 @@ public class GridCacheInterceptorAtomicRebalanceTest extends GridAbstractCacheIn @Override protected CacheAtomicityMode atomicityMode() { return CacheAtomicityMode.ATOMIC; } - - /** {@inheritDoc} */ - @Override protected CacheMemoryMode memoryMode() { - return CacheMemoryMode.ONHEAP_TIERED; - } } http://git-wip-us.apache.org/repos/asf/ignite/blob/5ec807a5/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheInterceptorTransactionalRebalanceTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheInterceptorTransactionalRebalanceTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheInterceptorTransactionalRebalanceTest.java index bace87c..87c3f32 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheInterceptorTransactionalRebalanceTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheInterceptorTransactionalRebalanceTest.java @@ -18,7 +18,6 @@ package org.apache.ignite.internal.processors.cache; import org.apache.ignite.cache.CacheAtomicityMode; -import org.apache.ignite.cache.CacheMemoryMode; /** * @@ -28,9 +27,4 @@ public class GridCacheInterceptorTransactionalRebalanceTest extends GridAbstract @Override protected CacheAtomicityMode atomicityMode() { return CacheAtomicityMode.TRANSACTIONAL; } - - /** {@inheritDoc} */ - @Override protected CacheMemoryMode memoryMode() { - return CacheMemoryMode.ONHEAP_TIERED; - } } http://git-wip-us.apache.org/repos/asf/ignite/blob/5ec807a5/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffheapUpdateSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffheapUpdateSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffheapUpdateSelfTest.java index 08173c2..3693b33 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffheapUpdateSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffheapUpdateSelfTest.java @@ -20,7 +20,6 @@ package org.apache.ignite.internal.processors.cache; import org.apache.ignite.Ignite; import org.apache.ignite.IgniteCache; import org.apache.ignite.cache.CacheAtomicityMode; -import org.apache.ignite.cache.CacheMemoryMode; import org.apache.ignite.cache.CacheMode; import org.apache.ignite.cluster.ClusterNode; import org.apache.ignite.configuration.CacheConfiguration; http://git-wip-us.apache.org/repos/asf/ignite/blob/5ec807a5/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePutAllFailoverSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePutAllFailoverSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePutAllFailoverSelfTest.java index 406194c..9bce997 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePutAllFailoverSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePutAllFailoverSelfTest.java @@ -102,9 +102,6 @@ public class GridCachePutAllFailoverSelfTest extends GridCommonAbstractTest { /** Backups count. */ private int backups; - /** */ - private GridTestUtils.TestMemoryMode memMode = GridTestUtils.TestMemoryMode.HEAP; - /** Filter to include only worker nodes. */ private static final IgnitePredicate workerNodesFilter = new PN() { @SuppressWarnings("unchecked") @@ -206,60 +203,6 @@ public class GridCachePutAllFailoverSelfTest extends GridCommonAbstractTest { checkPutAllFailoverColocated(false, 5, 2); } - /** - * @throws Exception If failed. - */ - public void testPutAllFailoverColocatedNearEnabledTwoBackupsSwap() throws Exception { - memMode = GridTestUtils.TestMemoryMode.SWAP; - - checkPutAllFailoverColocated(true, 5, 2); - } - - /** - * @throws Exception If failed. - */ - public void testPutAllFailoverColocatedTwoBackupsSwap() throws Exception { - memMode = GridTestUtils.TestMemoryMode.SWAP; - - checkPutAllFailoverColocated(false, 5, 2); - } - - /** - * @throws Exception If failed. - */ - public void testPutAllFailoverColocatedNearEnabledTwoBackupsOffheapTiered() throws Exception { - memMode = GridTestUtils.TestMemoryMode.OFFHEAP_TIERED; - - checkPutAllFailoverColocated(true, 5, 2); - } - - /** - * @throws Exception If failed. - */ - public void testPutAllFailoverColocatedNearEnabledTwoBackupsOffheapTieredSwap() throws Exception { - memMode = GridTestUtils.TestMemoryMode.OFFHEAP_TIERED_SWAP; - - checkPutAllFailoverColocated(true, 5, 2); - } - - /** - * @throws Exception If failed. - */ - public void testPutAllFailoverColocatedNearEnabledTwoBackupsOffheapEvict() throws Exception { - memMode = GridTestUtils.TestMemoryMode.OFFHEAP_EVICT; - - checkPutAllFailoverColocated(true, 5, 2); - } - - /** - * @throws Exception If failed. - */ - public void testPutAllFailoverColocatedNearEnabledTwoBackupsOffheapEvictSwap() throws Exception { - memMode = GridTestUtils.TestMemoryMode.OFFHEAP_EVICT_SWAP; - - checkPutAllFailoverColocated(true, 5, 2); - } - /** {@inheritDoc} */ @Override protected long getTestTimeout() { return super.getTestTimeout() * 5; @@ -754,7 +697,6 @@ public class GridCachePutAllFailoverSelfTest extends GridCommonAbstractTest { cacheCfg.setWriteSynchronizationMode(FULL_SYNC); - GridTestUtils.setMemoryMode(cfg, cacheCfg, memMode, 1000, 10 * 1024); cfg.setCacheConfiguration(cacheCfg); } http://git-wip-us.apache.org/repos/asf/ignite/blob/5ec807a5/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTtlManagerEvictionSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTtlManagerEvictionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTtlManagerEvictionSelfTest.java index e55853c..57d5007 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTtlManagerEvictionSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTtlManagerEvictionSelfTest.java @@ -21,9 +21,7 @@ import java.util.concurrent.TimeUnit; import javax.cache.expiry.CreatedExpiryPolicy; import javax.cache.expiry.Duration; import org.apache.ignite.IgniteCache; -import org.apache.ignite.IgniteException; import org.apache.ignite.Ignition; -import org.apache.ignite.cache.CacheMemoryMode; import org.apache.ignite.cache.CacheMode; import org.apache.ignite.cache.eviction.fifo.FifoEvictionPolicy; import org.apache.ignite.configuration.CacheConfiguration; @@ -50,9 +48,6 @@ public class GridCacheTtlManagerEvictionSelfTest extends GridCommonAbstractTest /** Cache mode. */ private volatile CacheMode cacheMode; - /** Cache memory mode. */ - private volatile CacheMemoryMode cacheMemoryMode; - /** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); @@ -66,7 +61,6 @@ public class GridCacheTtlManagerEvictionSelfTest extends GridCommonAbstractTest CacheConfiguration ccfg = new CacheConfiguration(); ccfg.setCacheMode(cacheMode); - ccfg.setMemoryMode(cacheMemoryMode); ccfg.setEagerTtl(true); ccfg.setEvictionPolicy(new FifoEvictionPolicy(ENTRIES_LIMIT, 100)); ccfg.setExpiryPolicyFactory(CreatedExpiryPolicy.factoryOf(new Duration(TimeUnit.HOURS, 12))); @@ -80,21 +74,21 @@ public class GridCacheTtlManagerEvictionSelfTest extends GridCommonAbstractTest * @throws Exception If failed. */ public void testLocalEviction() throws Exception { - checkEviction(CacheMode.LOCAL, CacheMemoryMode.ONHEAP_TIERED); + checkEviction(CacheMode.LOCAL); } /** * @throws Exception If failed. */ public void testPartitionedEviction() throws Exception { - checkEviction(CacheMode.PARTITIONED, CacheMemoryMode.ONHEAP_TIERED); + checkEviction(CacheMode.PARTITIONED); } /** * @throws Exception If failed. */ public void testReplicatedEviction() throws Exception { - checkEviction(CacheMode.REPLICATED, CacheMemoryMode.ONHEAP_TIERED); + checkEviction(CacheMode.REPLICATED); } /** @@ -102,9 +96,8 @@ public class GridCacheTtlManagerEvictionSelfTest extends GridCommonAbstractTest * @throws Exception If failed. */ @SuppressWarnings("ConstantConditions") - private void checkEviction(CacheMode mode, CacheMemoryMode memoryMode) throws Exception { + private void checkEviction(CacheMode mode) throws Exception { cacheMode = mode; - cacheMemoryMode = memoryMode; final IgniteKernal g = (IgniteKernal)startGrid(0); http://git-wip-us.apache.org/repos/asf/ignite/blob/5ec807a5/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheValueBytesPreloadingSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheValueBytesPreloadingSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheValueBytesPreloadingSelfTest.java index e51c5ef..9d03e83 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheValueBytesPreloadingSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheValueBytesPreloadingSelfTest.java @@ -18,14 +18,12 @@ package org.apache.ignite.internal.processors.cache; import java.util.Arrays; -import org.apache.ignite.cache.CacheMemoryMode; import org.apache.ignite.cache.CacheRebalanceMode; import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; -import static org.apache.ignite.cache.CacheMemoryMode.ONHEAP_TIERED; import static org.apache.ignite.cache.CacheMode.PARTITIONED; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; @@ -33,9 +31,6 @@ import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; * */ public class GridCacheValueBytesPreloadingSelfTest extends GridCommonAbstractTest { - /** Memory mode. */ - private CacheMemoryMode memMode; - /** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); @@ -58,7 +53,6 @@ public class GridCacheValueBytesPreloadingSelfTest extends GridCommonAbstractTes ccfg.setAtomicityMode(ATOMIC); ccfg.setNearConfiguration(null); ccfg.setWriteSynchronizationMode(FULL_SYNC); - ccfg.setMemoryMode(memMode); ccfg.setOffHeapMaxMemory(1024 * 1024 * 1024); ccfg.setRebalanceMode(CacheRebalanceMode.SYNC); @@ -69,8 +63,6 @@ public class GridCacheValueBytesPreloadingSelfTest extends GridCommonAbstractTes * @throws Exception If failed. */ public void testOnHeapTiered() throws Exception { - memMode = ONHEAP_TIERED; - startGrids(1); try { http://git-wip-us.apache.org/repos/asf/ignite/blob/5ec807a5/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAtomicPutAllFailoverSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAtomicPutAllFailoverSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAtomicPutAllFailoverSelfTest.java index 3f9fc5c..1feafe4 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAtomicPutAllFailoverSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAtomicPutAllFailoverSelfTest.java @@ -29,9 +29,4 @@ public class IgniteCacheAtomicPutAllFailoverSelfTest extends GridCachePutAllFail @Override protected CacheAtomicityMode atomicityMode() { return ATOMIC; } - - /** {@inheritDoc} */ - @Override public void testPutAllFailoverColocatedNearEnabledTwoBackupsOffheapTieredSwap(){ - fail("https://issues.apache.org/jira/browse/IGNITE-1584"); - } } \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ignite/blob/5ec807a5/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigVariationsFullApiTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigVariationsFullApiTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigVariationsFullApiTest.java index c8904db..083cdf3 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigVariationsFullApiTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigVariationsFullApiTest.java @@ -3757,15 +3757,8 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar * @param k Key. */ private void checkKeyAfterLocalEvict(IgniteCache cache, String k) { - switch (memoryMode()) { - case ONHEAP_TIERED: - assertNull(cache.localPeek(k, ONHEAP)); - assertEquals(offheapEnabled(), cache.localPeek(k, OFFHEAP) != null); - - break; - default: - fail("Unexpected memory mode: " + memoryMode()); - } + assertNull(cache.localPeek(k, ONHEAP)); + assertEquals(offheapEnabled(), cache.localPeek(k, OFFHEAP) != null); } /** http://git-wip-us.apache.org/repos/asf/ignite/blob/5ec807a5/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerAbstractTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerAbstractTest.java index dd27d72..e0e2771 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerAbstractTest.java @@ -58,7 +58,6 @@ import javax.cache.processor.MutableEntry; import org.apache.ignite.Ignite; import org.apache.ignite.IgniteCache; import org.apache.ignite.cache.CacheEntryEventSerializableFilter; -import org.apache.ignite.cache.CacheMemoryMode; import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.internal.IgniteInternalFuture; @@ -76,7 +75,6 @@ import static javax.cache.event.EventType.CREATED; import static javax.cache.event.EventType.EXPIRED; import static javax.cache.event.EventType.REMOVED; import static javax.cache.event.EventType.UPDATED; -import static org.apache.ignite.cache.CacheMemoryMode.ONHEAP_TIERED; import static org.apache.ignite.cache.CacheMode.LOCAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; import static org.apache.ignite.cache.CacheMode.REPLICATED; @@ -116,8 +114,6 @@ public abstract class IgniteCacheEntryListenerAbstractTest extends IgniteCacheAb cfg.setEagerTtl(eagerTtl()); - cfg.setMemoryMode(memoryMode()); - return cfg; } @@ -133,13 +129,6 @@ public abstract class IgniteCacheEntryListenerAbstractTest extends IgniteCacheAb return cfg; } - /** - * @return Cache memory mode. - */ - protected CacheMemoryMode memoryMode() { - return ONHEAP_TIERED; - } - /** {@inheritDoc} */ @Override protected void afterTest() throws Exception { super.afterTest(); http://git-wip-us.apache.org/repos/asf/ignite/blob/5ec807a5/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerExpiredEventsTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerExpiredEventsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerExpiredEventsTest.java index 60176d9..b0be14e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerExpiredEventsTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerExpiredEventsTest.java @@ -28,7 +28,6 @@ import javax.cache.expiry.Duration; import javax.cache.expiry.ModifiedExpiryPolicy; import org.apache.ignite.IgniteCache; import org.apache.ignite.cache.CacheAtomicityMode; -import org.apache.ignite.cache.CacheMemoryMode; import org.apache.ignite.cache.CacheMode; import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.configuration.IgniteConfiguration; @@ -44,7 +43,6 @@ import static java.util.concurrent.TimeUnit.MILLISECONDS; import static org.apache.ignite.cache.CacheAtomicWriteOrderMode.PRIMARY; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; -import static org.apache.ignite.cache.CacheMemoryMode.ONHEAP_TIERED; import static org.apache.ignite.cache.CacheMode.PARTITIONED; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; @@ -85,14 +83,14 @@ public class IgniteCacheEntryListenerExpiredEventsTest extends GridCommonAbstrac * @throws Exception If failed. */ public void testExpiredEventAtomic() throws Exception { - checkExpiredEvents(cacheConfiguration(PARTITIONED, ATOMIC, ONHEAP_TIERED)); + checkExpiredEvents(cacheConfiguration(PARTITIONED, ATOMIC)); } /** * @throws Exception If failed. */ public void testExpiredEventTx() throws Exception { - checkExpiredEvents(cacheConfiguration(PARTITIONED, TRANSACTIONAL, ONHEAP_TIERED)); + checkExpiredEvents(cacheConfiguration(PARTITIONED, TRANSACTIONAL)); } /** @@ -143,18 +141,15 @@ public class IgniteCacheEntryListenerExpiredEventsTest extends GridCommonAbstrac * * @param cacheMode Cache mode. * @param atomicityMode Cache atomicity mode. - * @param memoryMode Cache memory mode. * @return Cache configuration. */ private CacheConfiguration cacheConfiguration( CacheMode cacheMode, - CacheAtomicityMode atomicityMode, - CacheMemoryMode memoryMode) { + CacheAtomicityMode atomicityMode) { CacheConfiguration ccfg = new CacheConfiguration<>(); ccfg.setAtomicityMode(atomicityMode); ccfg.setCacheMode(cacheMode); - ccfg.setMemoryMode(memoryMode); ccfg.setWriteSynchronizationMode(FULL_SYNC); ccfg.setAtomicWriteOrderMode(PRIMARY); http://git-wip-us.apache.org/repos/asf/ignite/blob/5ec807a5/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheExpireAndUpdateConsistencyTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheExpireAndUpdateConsistencyTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheExpireAndUpdateConsistencyTest.java index 87d8a06..18570a6 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheExpireAndUpdateConsistencyTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheExpireAndUpdateConsistencyTest.java @@ -33,7 +33,6 @@ import org.apache.ignite.Ignite; import org.apache.ignite.IgniteCache; import org.apache.ignite.IgniteTransactions; import org.apache.ignite.cache.CacheAtomicityMode; -import org.apache.ignite.cache.CacheMemoryMode; import org.apache.ignite.cache.query.ContinuousQuery; import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.configuration.IgniteConfiguration; @@ -53,7 +52,6 @@ import org.apache.ignite.transactions.Transaction; import static java.util.concurrent.TimeUnit.SECONDS; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; -import static org.apache.ignite.cache.CacheMemoryMode.ONHEAP_TIERED; import static org.apache.ignite.cache.CacheMode.PARTITIONED; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; import static org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC; @@ -107,42 +105,42 @@ public class IgniteCacheExpireAndUpdateConsistencyTest extends GridCommonAbstrac * @throws Exception If failed. */ public void testAtomic1() throws Exception { - updateAndEventConsistencyTest(cacheConfiguration(ATOMIC, ONHEAP_TIERED, 0)); + updateAndEventConsistencyTest(cacheConfiguration(ATOMIC, 0)); } /** * @throws Exception If failed. */ public void testAtomic2() throws Exception { - updateAndEventConsistencyTest(cacheConfiguration(ATOMIC, ONHEAP_TIERED, 1)); + updateAndEventConsistencyTest(cacheConfiguration(ATOMIC, 1)); } /** * @throws Exception If failed. */ public void testAtomic3() throws Exception { - updateAndEventConsistencyTest(cacheConfiguration(ATOMIC, ONHEAP_TIERED, 2)); + updateAndEventConsistencyTest(cacheConfiguration(ATOMIC, 2)); } /** * @throws Exception If failed. */ public void testTx1() throws Exception { - updateAndEventConsistencyTest(cacheConfiguration(TRANSACTIONAL, ONHEAP_TIERED, 0)); + updateAndEventConsistencyTest(cacheConfiguration(TRANSACTIONAL, 0)); } /** * @throws Exception If failed. */ public void testTx2() throws Exception { - updateAndEventConsistencyTest(cacheConfiguration(TRANSACTIONAL, ONHEAP_TIERED, 1)); + updateAndEventConsistencyTest(cacheConfiguration(TRANSACTIONAL, 1)); } /** * @throws Exception If failed. */ public void testTx3() throws Exception { - updateAndEventConsistencyTest(cacheConfiguration(TRANSACTIONAL, ONHEAP_TIERED, 2)); + updateAndEventConsistencyTest(cacheConfiguration(TRANSACTIONAL, 2)); } /** @@ -332,18 +330,14 @@ public class IgniteCacheExpireAndUpdateConsistencyTest extends GridCommonAbstrac /** * @param atomicityMode Cache atomicity mode. - * @param memoryMode Cache memory mode. * @param backups Number of backups. * @return Cache configuration. */ - private CacheConfiguration cacheConfiguration(CacheAtomicityMode atomicityMode, - CacheMemoryMode memoryMode, - int backups) { + private CacheConfiguration cacheConfiguration(CacheAtomicityMode atomicityMode, int backups) { CacheConfiguration ccfg = new CacheConfiguration<>(); ccfg.setCacheMode(PARTITIONED); ccfg.setAtomicityMode(atomicityMode); - ccfg.setMemoryMode(memoryMode); ccfg.setWriteSynchronizationMode(FULL_SYNC); ccfg.setBackups(backups); http://git-wip-us.apache.org/repos/asf/ignite/blob/5ec807a5/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeReadThroughAbstractTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeReadThroughAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeReadThroughAbstractTest.java index f37fb54..8d2db44 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeReadThroughAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeReadThroughAbstractTest.java @@ -28,7 +28,6 @@ import javax.cache.processor.MutableEntry; import org.apache.ignite.Ignite; import org.apache.ignite.IgniteCache; import org.apache.ignite.cache.CacheAtomicityMode; -import org.apache.ignite.cache.CacheMemoryMode; import org.apache.ignite.cache.CacheMode; import org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction; import org.apache.ignite.cache.store.CacheStore; @@ -322,7 +321,6 @@ public abstract class IgniteCacheInvokeReadThroughAbstractTest extends GridCommo /** * @param cacheMode Cache mode. * @param atomicityMode Atomicity mode. - * @param memoryMode Memory mode. * @param backups Number of backups. * @param nearCache Near cache flag. * @return Cache configuration. @@ -330,7 +328,6 @@ public abstract class IgniteCacheInvokeReadThroughAbstractTest extends GridCommo @SuppressWarnings("unchecked") protected CacheConfiguration cacheConfiguration(CacheMode cacheMode, CacheAtomicityMode atomicityMode, - CacheMemoryMode memoryMode, int backups, boolean nearCache) { CacheConfiguration ccfg = new CacheConfiguration(); @@ -343,7 +340,6 @@ public abstract class IgniteCacheInvokeReadThroughAbstractTest extends GridCommo ccfg.setCacheMode(cacheMode); ccfg.setAffinity(new RendezvousAffinityFunction(false, 32)); ccfg.setAtomicWriteOrderMode(PRIMARY); - ccfg.setMemoryMode(memoryMode); if (nearCache) ccfg.setNearConfiguration(new NearCacheConfiguration()); http://git-wip-us.apache.org/repos/asf/ignite/blob/5ec807a5/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeReadThroughSingleNodeTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeReadThroughSingleNodeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeReadThroughSingleNodeTest.java index 89efc92..406e5af 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeReadThroughSingleNodeTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeReadThroughSingleNodeTest.java @@ -19,7 +19,6 @@ package org.apache.ignite.internal.processors.cache; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; -import static org.apache.ignite.cache.CacheMemoryMode.ONHEAP_TIERED; import static org.apache.ignite.cache.CacheMode.LOCAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; import static org.apache.ignite.cache.CacheMode.REPLICATED; @@ -37,55 +36,55 @@ public class IgniteCacheInvokeReadThroughSingleNodeTest extends IgniteCacheInvok * @throws Exception If failed. */ public void testInvokeReadThroughAtomic() throws Exception { - invokeReadThrough(cacheConfiguration(PARTITIONED, ATOMIC, ONHEAP_TIERED, 1, false)); + invokeReadThrough(cacheConfiguration(PARTITIONED, ATOMIC, 1, false)); } /** * @throws Exception If failed. */ public void testInvokeReadThroughAtomicNearCache() throws Exception { - invokeReadThrough(cacheConfiguration(PARTITIONED, ATOMIC, ONHEAP_TIERED, 1, true)); + invokeReadThrough(cacheConfiguration(PARTITIONED, ATOMIC, 1, true)); } /** * @throws Exception If failed. */ public void testInvokeReadThroughAtomicReplicated() throws Exception { - invokeReadThrough(cacheConfiguration(REPLICATED, ATOMIC, ONHEAP_TIERED, 0, false)); + invokeReadThrough(cacheConfiguration(REPLICATED, ATOMIC, 0, false)); } /** * @throws Exception If failed. */ public void testInvokeReadThroughAtomicLocal() throws Exception { - invokeReadThrough(cacheConfiguration(LOCAL, ATOMIC, ONHEAP_TIERED, 0, false)); + invokeReadThrough(cacheConfiguration(LOCAL, ATOMIC, 0, false)); } /** * @throws Exception If failed. */ public void testInvokeReadThroughTx() throws Exception { - invokeReadThrough(cacheConfiguration(PARTITIONED, TRANSACTIONAL, ONHEAP_TIERED, 1, false)); + invokeReadThrough(cacheConfiguration(PARTITIONED, TRANSACTIONAL, 1, false)); } /** * @throws Exception If failed. */ public void testInvokeReadThroughTxNearCache() throws Exception { - invokeReadThrough(cacheConfiguration(PARTITIONED, TRANSACTIONAL, ONHEAP_TIERED, 1, true)); + invokeReadThrough(cacheConfiguration(PARTITIONED, TRANSACTIONAL, 1, true)); } /** * @throws Exception If failed. */ public void testInvokeReadThroughTxReplicated() throws Exception { - invokeReadThrough(cacheConfiguration(REPLICATED, TRANSACTIONAL, ONHEAP_TIERED, 0, false)); + invokeReadThrough(cacheConfiguration(REPLICATED, TRANSACTIONAL, 0, false)); } /** * @throws Exception If failed. */ public void testInvokeReadThroughTxLocal() throws Exception { - invokeReadThrough(cacheConfiguration(LOCAL, TRANSACTIONAL, ONHEAP_TIERED, 0, false)); + invokeReadThrough(cacheConfiguration(LOCAL, TRANSACTIONAL, 0, false)); } }