You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by ag...@apache.org on 2017/04/10 14:17:51 UTC
[01/17] ignite git commit: IGNITE-4535 - Add option to store
deserialized values on-heap
Repository: ignite
Updated Branches:
refs/heads/ignite-3477-master 7102d532c -> c56c4b8c6
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/yardstick/config/ignite-base-load-config.xml
----------------------------------------------------------------------
diff --git a/modules/yardstick/config/ignite-base-load-config.xml b/modules/yardstick/config/ignite-base-load-config.xml
index dfa3304..cd9eb06 100644
--- a/modules/yardstick/config/ignite-base-load-config.xml
+++ b/modules/yardstick/config/ignite-base-load-config.xml
@@ -48,27 +48,6 @@
<property name="atomicityMode" value="ATOMIC"/>
</bean>
- <bean name="atomic-offheap" class="org.apache.ignite.configuration.CacheConfiguration">
- <property name="name" value="atomic-offheap"/>
-
- <property name="cacheMode" value="PARTITIONED"/>
-
- <property name="atomicityMode" value="ATOMIC"/>
-
- <property name="memoryMode" value="OFFHEAP_TIERED"/>
- </bean>
-
- <bean name="atomic-offheap-values" class="org.apache.ignite.configuration.CacheConfiguration">
- <property name="name" value="atomic-offheap-values"/>
-
- <property name="cacheMode" value="PARTITIONED"/>
-
- <property name="atomicityMode" value="ATOMIC"/>
-
- <property name="memoryMode" value="OFFHEAP_VALUES"/>
-
- </bean>
-
<bean name="tx" class="org.apache.ignite.configuration.CacheConfiguration">
<property name="name" value="tx-fat-values"/>
@@ -78,28 +57,6 @@
</bean>
- <bean name="tx-offheap" class="org.apache.ignite.configuration.CacheConfiguration">
- <property name="name" value="tx-offheap"/>
-
- <property name="cacheMode" value="PARTITIONED"/>
-
- <property name="atomicityMode" value="TRANSACTIONAL"/>
-
- <property name="memoryMode" value="OFFHEAP_TIERED"/>
-
- </bean>
-
- <bean name="tx-offheap-values" class="org.apache.ignite.configuration.CacheConfiguration">
- <property name="name" value="tx-offheap-values"/>
-
- <property name="cacheMode" value="PARTITIONED"/>
-
- <property name="atomicityMode" value="TRANSACTIONAL"/>
-
- <property name="memoryMode" value="OFFHEAP_VALUES"/>
-
- </bean>
-
<bean name="atomic-index" class="org.apache.ignite.configuration.CacheConfiguration">
<property name="name" value="atomic-index"/>
@@ -197,26 +154,6 @@
</property>
</bean>
- <bean name="query-offheap" class="org.apache.ignite.configuration.CacheConfiguration">
- <property name="name" value="query-offheap"/>
-
- <property name="cacheMode" value="PARTITIONED"/>
-
- <property name="atomicityMode" value="ATOMIC"/>
-
- <property name="memoryMode" value="OFFHEAP_TIERED"/>
-
- <property name="indexedTypes">
- <list>
- <value>java.lang.Integer</value>
- <value>org.apache.ignite.yardstick.cache.model.Organization</value>
-
- <value>java.lang.Integer</value>
- <value>org.apache.ignite.yardstick.cache.model.Person</value>
- </list>
- </property>
- </bean>
-
<bean name="compute" class="org.apache.ignite.configuration.CacheConfiguration">
<property name="name" value="compute"/>
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/yardstick/config/ignite-cache-load-config.xml
----------------------------------------------------------------------
diff --git a/modules/yardstick/config/ignite-cache-load-config.xml b/modules/yardstick/config/ignite-cache-load-config.xml
index 6c6ac89..f58237f 100644
--- a/modules/yardstick/config/ignite-cache-load-config.xml
+++ b/modules/yardstick/config/ignite-cache-load-config.xml
@@ -32,15 +32,10 @@
<property name="cacheConfiguration">
<list>
<ref bean="atomic" />
- <ref bean="atomic-offheap" />
- <ref bean="atomic-offheap-values" />
<ref bean="tx" />
- <ref bean="tx-offheap" />
- <ref bean="tx-offheap-values" />
<ref bean="atomic-index" />
<ref bean="query" />
<ref bean="orgCache" />
- <!--<ref bean="query-offheap" />-->
<ref bean="compute" />
</list>
</property>
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/yardstick/config/ignite-failover-base-config.xml
----------------------------------------------------------------------
diff --git a/modules/yardstick/config/ignite-failover-base-config.xml b/modules/yardstick/config/ignite-failover-base-config.xml
index 0a3bd88..8de4142 100644
--- a/modules/yardstick/config/ignite-failover-base-config.xml
+++ b/modules/yardstick/config/ignite-failover-base-config.xml
@@ -37,41 +37,21 @@
<property name="name" value="atomic-reties"/>
</bean>
- <bean class="org.apache.ignite.configuration.CacheConfiguration" parent="atomic-offheap">
- <property name="name" value="atomic-offheap-reties"/>
- </bean>
-
<bean class="org.apache.ignite.configuration.CacheConfiguration" parent="atomic">
<property name="name" value="atomic-invoke-retry"/>
</bean>
- <bean class="org.apache.ignite.configuration.CacheConfiguration" parent="atomic-offheap">
- <property name="name" value="atomic-offheap-invoke-retry"/>
- </bean>
-
<bean class="org.apache.ignite.configuration.CacheConfiguration" parent="tx">
<property name="name" value="tx-invoke-retry"/>
</bean>
- <bean class="org.apache.ignite.configuration.CacheConfiguration" parent="tx-offheap">
- <property name="name" value="tx-offheap-invoke-retry"/>
- </bean>
-
<bean class="org.apache.ignite.configuration.CacheConfiguration" parent="tx">
<property name="name" value="tx-write-read"/>
</bean>
- <bean class="org.apache.ignite.configuration.CacheConfiguration" parent="tx-offheap">
- <property name="name" value="tx-offheap-write-read"/>
- </bean>
-
<bean class="org.apache.ignite.configuration.CacheConfiguration" parent="tx">
<property name="name" value="tx-write-invoke"/>
</bean>
-
- <bean class="org.apache.ignite.configuration.CacheConfiguration" parent="tx-offheap">
- <property name="name" value="tx-offheap-write-invoke"/>
- </bean>
</list>
</property>
@@ -92,16 +72,6 @@
<property name="atomicityMode" value="ATOMIC"/>
</bean>
- <bean id="atomic-offheap" class="org.apache.ignite.configuration.CacheConfiguration" abstract="true">
- <property name="name" value="atomic-offheap"/>
-
- <property name="cacheMode" value="PARTITIONED"/>
-
- <property name="atomicityMode" value="ATOMIC"/>
-
- <property name="memoryMode" value="OFFHEAP_TIERED"/>
- </bean>
-
<bean id="tx" class="org.apache.ignite.configuration.CacheConfiguration" abstract="true">
<property name="cacheMode" value="PARTITIONED"/>
@@ -110,11 +80,4 @@
<property name="swapEnabled" value="false"/>
</bean>
- <bean id="tx-offheap" class="org.apache.ignite.configuration.CacheConfiguration" abstract="true">
- <property name="cacheMode" value="PARTITIONED"/>
-
- <property name="atomicityMode" value="TRANSACTIONAL"/>
-
- <property name="memoryMode" value="OFFHEAP_TIERED"/>
- </bean>
</beans>
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/yardstick/config/ignite-int-max-values-offheap-config.xml
----------------------------------------------------------------------
diff --git a/modules/yardstick/config/ignite-int-max-values-offheap-config.xml b/modules/yardstick/config/ignite-int-max-values-offheap-config.xml
deleted file mode 100644
index 353744e..0000000
--- a/modules/yardstick/config/ignite-int-max-values-offheap-config.xml
+++ /dev/null
@@ -1,88 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
- 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.
--->
-
-<!--
- Ignite Spring configuration file.
--->
-<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="
- http://www.springframework.org/schema/beans
- http://www.springframework.org/schema/beans/spring-beans.xsd">
- <bean id="grid.cfg" class="org.apache.ignite.configuration.IgniteConfiguration">
- <property name="peerClassLoadingEnabled" value="true"/>
-
- <property name="marshaller">
- <bean class="org.apache.ignite.marshaller.optimized.OptimizedMarshaller">
- <property name="requireSerializable" value="false"/>
- </bean>
- </property>
-
-<!--
- <property name="marshaller">
- <bean class="org.apache.ignite.internal.binary.BinaryMarshaller"/>
- </property>
--->
-
- <property name="networkTimeout" value="600000"/>
-
- <property name="discoverySpi">
- <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
- <property name="networkTimeout" value="600000"/>
-
- <property name="socketTimeout" value="600000"/>
-
- <property name="ackTimeout" value="60000"/>
-
- <property name="ipFinder">
- <!-- <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder"> -->
- <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
- <!--
- <property name="addresses">
- <list>
- <!– In distributed environment, replace with actual host IP address. –>
- <value>127.0.0.1:47500..47509</value>
- </list>
- </property>
- -->
- </bean>
- </property>
- </bean>
- </property>
-
- <property name="cacheConfiguration">
- <list>
- <bean class="org.apache.ignite.configuration.CacheConfiguration">
- <property name="name" value="int-max-value-cache"/>
- <property name="cacheMode" value="PARTITIONED"/>
- <property name="backups" value="0"/>
- <property name="atomicityMode" value="ATOMIC"/>
- <property name="memoryMode" value="ONHEAP_TIERED"/>
- <property name="offHeapMaxMemory" value="#{32 * 1024 * 1024 * 1024L}"/>
- <property name="evictionPolicy">
- <bean class="org.apache.ignite.cache.eviction.fifo.FifoEvictionPolicy">
- <property name="maxSize" value="4000000"/>
- <property name="batchSize" value="500000"/>
- </bean>
- </property>
- </bean>
- </list>
- </property>
- </bean>
-</beans>
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/yardstick/config/ignite-int-max-values-swap-config.xml
----------------------------------------------------------------------
diff --git a/modules/yardstick/config/ignite-int-max-values-swap-config.xml b/modules/yardstick/config/ignite-int-max-values-swap-config.xml
deleted file mode 100644
index edb15d3..0000000
--- a/modules/yardstick/config/ignite-int-max-values-swap-config.xml
+++ /dev/null
@@ -1,93 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
- 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.
--->
-
-<!--
- Ignite Spring configuration file.
--->
-<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="
- http://www.springframework.org/schema/beans
- http://www.springframework.org/schema/beans/spring-beans.xsd">
- <bean id="grid.cfg" class="org.apache.ignite.configuration.IgniteConfiguration">
- <property name="peerClassLoadingEnabled" value="true"/>
-
- <property name="marshaller">
- <bean class="org.apache.ignite.marshaller.optimized.OptimizedMarshaller">
- <property name="requireSerializable" value="false"/>
- </bean>
- </property>
-
-<!--
- <property name="marshaller">
- <bean class="org.apache.ignite.internal.binary.BinaryMarshaller"/>
- </property>
--->
-
- <property name="networkTimeout" value="600000"/>
-
- <property name="discoverySpi">
- <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
- <property name="networkTimeout" value="600000"/>
-
- <property name="socketTimeout" value="600000"/>
-
- <property name="ackTimeout" value="60000"/>
-
- <property name="ipFinder">
- <!-- <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder"> -->
- <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
- <!--
- <property name="addresses">
- <list>
- <!– In distributed environment, replace with actual host IP address. –>
- <value>127.0.0.1:47500..47509</value>
- </list>
- </property>
- -->
- </bean>
- </property>
- </bean>
- </property>
-
- <property name="cacheConfiguration">
- <list>
- <bean class="org.apache.ignite.configuration.CacheConfiguration">
- <property name="name" value="int-max-value-cache"/>
- <property name="cacheMode" value="PARTITIONED"/>
- <property name="backups" value="0"/>
- <property name="atomicityMode" value="ATOMIC"/>
- <property name="memoryMode" value="ONHEAP_TIERED"/>
- <property name="offHeapMaxMemory" value="#{32 * 1024 * 1024 * 1024L}"/>
- <property name="swapEnabled" value="true"/>
- <property name="evictionPolicy">
- <bean class="org.apache.ignite.cache.eviction.fifo.FifoEvictionPolicy">
- <property name="maxSize" value="4000000"/>
- <property name="batchSize" value="500000"/>
- </bean>
- </property>
- </bean>
- </list>
- </property>
-
- <property name="swapSpaceSpi">
- <bean class="org.apache.ignite.spi.swapspace.file.FileSwapSpaceSpi"/>
- </property>
- </bean>
-</beans>
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/yardstick/config/test-max-int-values-offheap.properties
----------------------------------------------------------------------
diff --git a/modules/yardstick/config/test-max-int-values-offheap.properties b/modules/yardstick/config/test-max-int-values-offheap.properties
deleted file mode 100644
index 4a42538..0000000
--- a/modules/yardstick/config/test-max-int-values-offheap.properties
+++ /dev/null
@@ -1,65 +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.
-
-#
-# Contains benchmarks for SQL queries.
-#
-
-# JVM options.
-# JVM_OPTS=${JVM_OPTS}" -DIGNITE_QUIET=false"
-
-# Uncomment to enable concurrent garbage collection (GC) if you encounter long GC pauses.
-JVM_OPTS=${JVM_OPTS}" \
--Xms8g \
--Xmx8g \
--Xloggc:./gc${now0}.log \
--XX:+PrintGCDetails \
--verbose:gc \
--XX:+UseParNewGC \
--XX:+UseConcMarkSweepGC \
-"
-
-#Ignite version
-ver="RELEASE-"
-
-# List of default probes.
-# Add DStatProbe or VmStatProbe if your OS supports it (e.g. if running on Linux).
-# BENCHMARK_DEFAULT_PROBES=ThroughputLatencyProbe,PercentileProbe
-
-# Packages where the specified benchmark is searched by reflection mechanism.
-BENCHMARK_PACKAGES=org.yardstickframework,org.apache.ignite.yardstick
-
-# Probe point writer class name.
-# BENCHMARK_WRITER=
-
-# Comma-separated list of the hosts to run BenchmarkServers on. 2 nodes on local host are enabled by default.
-SERVER_HOSTS=fosters-215,fosters-216,fosters-217,fosters-226,fosters-219,fosters-221,fosters-222,fosters-223
-
-# Comma-separated list of the hosts to run BenchmarkDrivers on. 1 node on local host is enabled by default.
-DRIVER_HOSTS=fosters-218
-
-# Remote username.
-# REMOTE_USER=
-
-# Number of nodes, used to wait for the specified number of nodes to start.
-nodesNum=$((`echo ${SERVER_HOSTS} | tr ',' '\n' | wc -l` + `echo ${DRIVER_HOSTS} | tr ',' '\n' | wc -l`))
-
-# Run configuration.
-# Note that each benchmark is set to run for 300 seconds (5 min) with warm-up set to 60 seconds (1 minute).
-CONFIGS="\
--cfg ${SCRIPT_DIR}/../config/ignite-int-max-values-offheap-config.xml -nn ${nodesNum} -b 0 -w 0 -d 9999999 -t 1 -sm PRIMARY_SYNC -dn IntMaxValueEntriesTest -sn IgniteNode -ds ${ver}int-max-values-offheap\
-"
-
-
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/yardstick/config/test-max-int-values-swap.properties
----------------------------------------------------------------------
diff --git a/modules/yardstick/config/test-max-int-values-swap.properties b/modules/yardstick/config/test-max-int-values-swap.properties
deleted file mode 100644
index be0aed4..0000000
--- a/modules/yardstick/config/test-max-int-values-swap.properties
+++ /dev/null
@@ -1,64 +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.
-
-#
-# Contains benchmarks for SQL queries.
-#
-
-# JVM options.
-# JVM_OPTS=${JVM_OPTS}" -DIGNITE_QUIET=false"
-
-# Uncomment to enable concurrent garbage collection (GC) if you encounter long GC pauses.
-JVM_OPTS=${JVM_OPTS}" \
--Xms8g \
--Xmx8g \
--Xloggc:./gc${now0}.log \
--XX:+PrintGCDetails \
--verbose:gc \
--XX:+UseParNewGC \
--XX:+UseConcMarkSweepGC \
-"
-
-#Ignite version
-ver="RELEASE-"
-
-# List of default probes.
-# Add DStatProbe or VmStatProbe if your OS supports it (e.g. if running on Linux).
-# BENCHMARK_DEFAULT_PROBES=ThroughputLatencyProbe,PercentileProbe
-
-# Packages where the specified benchmark is searched by reflection mechanism.
-BENCHMARK_PACKAGES=org.yardstickframework,org.apache.ignite.yardstick
-
-# Probe point writer class name.
-# BENCHMARK_WRITER=
-
-# Comma-separated list of the hosts to run BenchmarkServers on. 2 nodes on local host are enabled by default.
-SERVER_HOSTS=fosters-215,fosters-216,fosters-217,fosters-226,fosters-219,fosters-221,fosters-222,fosters-223
-
-# Comma-separated list of the hosts to run BenchmarkDrivers on. 1 node on local host is enabled by default.
-DRIVER_HOSTS=fosters-218
-
-# Remote username.
-# REMOTE_USER=
-
-# Number of nodes, used to wait for the specified number of nodes to start.
-nodesNum=$((`echo ${SERVER_HOSTS} | tr ',' '\n' | wc -l` + `echo ${DRIVER_HOSTS} | tr ',' '\n' | wc -l`))
-
-# Run configuration.
-# Note that each benchmark is set to run for 300 seconds (5 min) with warm-up set to 60 seconds (1 minute).
-CONFIGS="\
--cfg ${SCRIPT_DIR}/../config/ignite-int-max-values-swap-config.xml -nn ${nodesNum} -b 0 -w 0 -d 9999999 -t 1 -sm PRIMARY_SYNC -dn IntMaxValueEntriesTest -sn IgniteNode -ds ${ver}int-max-values-swap\
-"
-
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/yardstick/src/main/java/org/apache/ignite/yardstick/IgniteBenchmarkArguments.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/IgniteBenchmarkArguments.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/IgniteBenchmarkArguments.java
index cef783e..e096caf 100644
--- a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/IgniteBenchmarkArguments.java
+++ b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/IgniteBenchmarkArguments.java
@@ -78,14 +78,6 @@ public class IgniteBenchmarkArguments {
private TransactionIsolation txIsolation = TransactionIsolation.REPEATABLE_READ;
/** */
- @Parameter(names = {"-ot", "--offheapTiered"}, description = "Tiered offheap")
- private boolean offheapTiered;
-
- /** */
- @Parameter(names = {"-ov", "--offheapValuesOnly"}, description = "Offheap values only")
- private boolean offheapVals;
-
- /** */
@Parameter(names = {"-rtp", "--restPort"}, description = "REST TCP port")
private int restTcpPort;
@@ -295,27 +287,6 @@ public class IgniteBenchmarkArguments {
}
/**
- * @return Offheap tiered.
- */
- public boolean isOffheapTiered() {
- return offheapTiered;
- }
-
- /**
- * @return Offheap values.
- */
- public boolean isOffheapValues() {
- return offheapVals;
- }
-
- /**
- * @return {@code True} if any offheap is enabled.
- */
- public boolean isOffHeap() {
- return offheapTiered || offheapVals;
- }
-
- /**
* @return Nodes.
*/
public int nodes() {
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/yardstick/src/main/java/org/apache/ignite/yardstick/IgniteNode.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/IgniteNode.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/IgniteNode.java
index b8f3a59..59b31f9 100644
--- a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/IgniteNode.java
+++ b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/IgniteNode.java
@@ -43,7 +43,6 @@ import org.yardstickframework.BenchmarkConfiguration;
import org.yardstickframework.BenchmarkServer;
import org.yardstickframework.BenchmarkUtils;
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_VALUES;
import static org.apache.ignite.internal.IgniteNodeAttributes.ATTR_MARSHALLER;
/**
@@ -126,15 +125,6 @@ public class IgniteNode implements BenchmarkServer {
c.setConnectorConfiguration(ccc);
}
- if (args.isOffHeap()) {
- cc.setOffHeapMaxMemory(0);
-
- if (args.isOffheapValues())
- cc.setMemoryMode(OFFHEAP_VALUES);
- else
- cc.setEvictionPolicy(new LruEvictionPolicy(50000));
- }
-
cc.setReadThrough(args.isStoreEnabled());
cc.setWriteThrough(args.isStoreEnabled());
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteGetOffHeapBenchmark.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteGetOffHeapBenchmark.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteGetOffHeapBenchmark.java
deleted file mode 100644
index 4e1d9d9..0000000
--- a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteGetOffHeapBenchmark.java
+++ /dev/null
@@ -1,32 +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.yardstick.cache;
-
-import org.apache.ignite.IgniteCache;
-import org.apache.ignite.cache.CacheMemoryMode;
-
-/**
- * Ignite benchmark that performs get operations with {@link CacheMemoryMode#OFFHEAP_TIERED OFFHEAP TIERED}
- * memory mode.
- */
-public class IgniteGetOffHeapBenchmark extends IgniteGetBenchmark {
- /** {@inheritDoc} */
- @Override protected IgniteCache<Integer, Object> cache() {
- return ignite().cache("atomic-offheap");
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteGetOffHeapValuesBenchmark.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteGetOffHeapValuesBenchmark.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteGetOffHeapValuesBenchmark.java
deleted file mode 100644
index 4042abe..0000000
--- a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteGetOffHeapValuesBenchmark.java
+++ /dev/null
@@ -1,32 +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.yardstick.cache;
-
-import org.apache.ignite.IgniteCache;
-import org.apache.ignite.cache.CacheMemoryMode;
-
-/**
- * Ignite benchmark that performs get operations with {@link CacheMemoryMode#OFFHEAP_VALUES OFFHEAP VALUES}
- * memory mode.
- */
-public class IgniteGetOffHeapValuesBenchmark extends IgniteGetBenchmark {
- /** {@inheritDoc} */
- @Override protected IgniteCache<Integer, Object> cache() {
- return ignite().cache("atomic-offheap-values");
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutGetOffHeapBenchmark.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutGetOffHeapBenchmark.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutGetOffHeapBenchmark.java
deleted file mode 100644
index 1074a49..0000000
--- a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutGetOffHeapBenchmark.java
+++ /dev/null
@@ -1,32 +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.yardstick.cache;
-
-import org.apache.ignite.IgniteCache;
-import org.apache.ignite.cache.CacheMemoryMode;
-
-/**
- * Ignite benchmark that performs put and get operations with {@link CacheMemoryMode#OFFHEAP_TIERED OFFHEAP TIRED}
- * memory mode.
- */
-public class IgnitePutGetOffHeapBenchmark extends IgnitePutGetBenchmark {
- /** {@inheritDoc} */
- @Override protected IgniteCache<Integer, Object> cache() {
- return ignite().cache("atomic-offheap");
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutGetOffHeapValuesBenchmark.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutGetOffHeapValuesBenchmark.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutGetOffHeapValuesBenchmark.java
deleted file mode 100644
index 2ec457c..0000000
--- a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutGetOffHeapValuesBenchmark.java
+++ /dev/null
@@ -1,32 +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.yardstick.cache;
-
-import org.apache.ignite.IgniteCache;
-import org.apache.ignite.cache.CacheMemoryMode;
-
-/**
- * Ignite benchmark that performs put and get operations
- * with {@link CacheMemoryMode#OFFHEAP_VALUES OFFHEAP VALUES} memory mode.
- */
-public class IgnitePutGetOffHeapValuesBenchmark extends IgnitePutGetBenchmark {
- /** {@inheritDoc} */
- @Override protected IgniteCache<Integer, Object> cache() {
- return ignite().cache("atomic-offheap-values");
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutGetTxOffHeapBenchmark.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutGetTxOffHeapBenchmark.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutGetTxOffHeapBenchmark.java
deleted file mode 100644
index 3359a14..0000000
--- a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutGetTxOffHeapBenchmark.java
+++ /dev/null
@@ -1,32 +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.yardstick.cache;
-
-import org.apache.ignite.IgniteCache;
-import org.apache.ignite.cache.CacheMemoryMode;
-
-/**
- * Ignite benchmark that performs transactional put and get operations
- * with {@link CacheMemoryMode#OFFHEAP_TIERED OFFHEAP TIERED} memory mode.
- */
-public class IgnitePutGetTxOffHeapBenchmark extends IgnitePutGetTxBenchmark {
- /** {@inheritDoc} */
- @Override protected IgniteCache<Integer, Object> cache() {
- return ignite().cache("tx-offheap");
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutGetTxOffHeapValuesBenchmark.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutGetTxOffHeapValuesBenchmark.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutGetTxOffHeapValuesBenchmark.java
deleted file mode 100644
index b911051..0000000
--- a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutGetTxOffHeapValuesBenchmark.java
+++ /dev/null
@@ -1,32 +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.yardstick.cache;
-
-import org.apache.ignite.IgniteCache;
-import org.apache.ignite.cache.CacheMemoryMode;
-
-/**
- * Ignite benchmark that performs transactional put and get operations
- * with {@link CacheMemoryMode#OFFHEAP_VALUES OFFHEAP VALUES} memory mode.
- */
-public class IgnitePutGetTxOffHeapValuesBenchmark extends IgnitePutGetTxBenchmark {
- /** {@inheritDoc} */
- @Override protected IgniteCache<Integer, Object> cache() {
- return ignite().cache("tx-offheap-values");
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutOffHeapBenchmark.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutOffHeapBenchmark.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutOffHeapBenchmark.java
deleted file mode 100644
index 5271671..0000000
--- a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutOffHeapBenchmark.java
+++ /dev/null
@@ -1,32 +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.yardstick.cache;
-
-import org.apache.ignite.IgniteCache;
-import org.apache.ignite.cache.CacheMemoryMode;
-
-/**
- * Ignite benchmark that performs put operations with {@link CacheMemoryMode#OFFHEAP_TIERED OFFHEAP TIERED}
- * memory mode.
- */
-public class IgnitePutOffHeapBenchmark extends IgnitePutBenchmark {
- /** {@inheritDoc} */
- @Override protected IgniteCache<Integer, Object> cache() {
- return ignite().cache("atomic-offheap");
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutOffHeapValuesBenchmark.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutOffHeapValuesBenchmark.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutOffHeapValuesBenchmark.java
deleted file mode 100644
index 8db4429..0000000
--- a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutOffHeapValuesBenchmark.java
+++ /dev/null
@@ -1,32 +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.yardstick.cache;
-
-import org.apache.ignite.IgniteCache;
-import org.apache.ignite.cache.CacheMemoryMode;
-
-/**
- * Ignite benchmark that performs put operations with {@link CacheMemoryMode#OFFHEAP_VALUES OFFHEAP VALUES}
- * memory mode.
- */
-public class IgnitePutOffHeapValuesBenchmark extends IgnitePutBenchmark {
- /** {@inheritDoc} */
- @Override protected IgniteCache<Integer, Object> cache() {
- return ignite().cache("atomic-offheap-values");
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutRandomValueSizeBenchmark.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutRandomValueSizeBenchmark.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutRandomValueSizeBenchmark.java
index be85b9f..180b50e 100644
--- a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutRandomValueSizeBenchmark.java
+++ b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutRandomValueSizeBenchmark.java
@@ -36,6 +36,6 @@ public class IgnitePutRandomValueSizeBenchmark extends IgniteCacheAbstractBenchm
/** {@inheritDoc} */
@Override protected IgniteCache<Integer, Object> cache() {
- return ignite().cache("atomic-offheap");
+ return ignite().cache("atomic");
}
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutTxOffHeapBenchmark.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutTxOffHeapBenchmark.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutTxOffHeapBenchmark.java
deleted file mode 100644
index 03e6e42..0000000
--- a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutTxOffHeapBenchmark.java
+++ /dev/null
@@ -1,32 +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.yardstick.cache;
-
-import org.apache.ignite.IgniteCache;
-import org.apache.ignite.cache.CacheMemoryMode;
-
-/**
- * Ignite benchmark that performs transactional put operations
- * with {@link CacheMemoryMode#OFFHEAP_TIERED OFFHEAP TIRED} memory mode.
- */
-public class IgnitePutTxOffHeapBenchmark extends IgnitePutTxImplicitBenchmark {
- /** {@inheritDoc} */
- @Override protected IgniteCache<Integer, Object> cache() {
- return ignite().cache("tx-offheap");
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutTxOffHeapValuesBenchmark.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutTxOffHeapValuesBenchmark.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutTxOffHeapValuesBenchmark.java
deleted file mode 100644
index 1cf04d7..0000000
--- a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutTxOffHeapValuesBenchmark.java
+++ /dev/null
@@ -1,32 +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.yardstick.cache;
-
-import org.apache.ignite.IgniteCache;
-import org.apache.ignite.cache.CacheMemoryMode;
-
-/**
- * Ignite benchmark that performs transactional put operations
- * with {@link CacheMemoryMode#OFFHEAP_VALUES OFFHEAP VALUES} memory mode.
- */
-public class IgnitePutTxOffHeapValuesBenchmark extends IgnitePutTxImplicitBenchmark {
- /** {@inheritDoc} */
- @Override protected IgniteCache<Integer, Object> cache() {
- return ignite().cache("tx-offheap-values");
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteSqlQueryJoinOffHeapBenchmark.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteSqlQueryJoinOffHeapBenchmark.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteSqlQueryJoinOffHeapBenchmark.java
deleted file mode 100644
index 3ea3d38..0000000
--- a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteSqlQueryJoinOffHeapBenchmark.java
+++ /dev/null
@@ -1,32 +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.yardstick.cache;
-
-import org.apache.ignite.IgniteCache;
-import org.apache.ignite.cache.CacheMemoryMode;
-
-/**
- * Ignite benchmark that performs query operations with joins
- * and {@link CacheMemoryMode#OFFHEAP_TIERED OFFHEAP TIERED} memory mode.
- */
-public class IgniteSqlQueryJoinOffHeapBenchmark extends IgniteSqlQueryJoinBenchmark {
- /** {@inheritDoc} */
- @Override protected IgniteCache<Integer, Object> cache() {
- return ignite().cache("query-offheap");
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteSqlQueryOffHeapBenchmark.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteSqlQueryOffHeapBenchmark.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteSqlQueryOffHeapBenchmark.java
deleted file mode 100644
index 8ad10e7..0000000
--- a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteSqlQueryOffHeapBenchmark.java
+++ /dev/null
@@ -1,32 +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.yardstick.cache;
-
-import org.apache.ignite.IgniteCache;
-import org.apache.ignite.cache.CacheMemoryMode;
-
-/**
- * Ignite benchmark that performs query operations with {@link CacheMemoryMode#OFFHEAP_TIERED OFFHEAP TIERED}
- * memory mode.
- */
-public class IgniteSqlQueryOffHeapBenchmark extends IgniteSqlQueryBenchmark {
- /** {@inheritDoc} */
- @Override protected IgniteCache<Integer, Object> cache() {
- return ignite().cache("query-offheap");
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteSqlQueryPutOffHeapBenchmark.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteSqlQueryPutOffHeapBenchmark.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteSqlQueryPutOffHeapBenchmark.java
deleted file mode 100644
index c820db7..0000000
--- a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteSqlQueryPutOffHeapBenchmark.java
+++ /dev/null
@@ -1,32 +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.yardstick.cache;
-
-import org.apache.ignite.IgniteCache;
-import org.apache.ignite.cache.CacheMemoryMode;
-
-/**
- * Ignite benchmark that performs put and query operations
- * with {@link CacheMemoryMode#OFFHEAP_TIERED OFFHEAP TIERED} memory mode.
- */
-public class IgniteSqlQueryPutOffHeapBenchmark extends IgniteSqlQueryPutBenchmark {
- /** {@inheritDoc} */
- @Override protected IgniteCache<Integer, Object> cache() {
- return ignite().cache("query-offheap");
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/failover/IgniteAtomicOffHeapInvokeRetryBenchmark.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/failover/IgniteAtomicOffHeapInvokeRetryBenchmark.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/failover/IgniteAtomicOffHeapInvokeRetryBenchmark.java
deleted file mode 100644
index c8b0b1d..0000000
--- a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/failover/IgniteAtomicOffHeapInvokeRetryBenchmark.java
+++ /dev/null
@@ -1,31 +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.yardstick.cache.failover;
-
-/**
- * Invoke retry failover benchmark. <p> Each client maintains a local map that it updates together with cache. Client
- * invokes an increment closure for all generated keys and atomically increments value for corresponding keys in the
- * local map. To validate cache contents, all writes from the client are stopped, values in the local map are compared
- * to the values in the cache.
- */
-public class IgniteAtomicOffHeapInvokeRetryBenchmark extends IgniteAtomicInvokeRetryBenchmark {
- /** {@inheritDoc} */
- @Override protected String cacheName() {
- return "atomic-offheap-invoke-retry";
- }
-}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/failover/IgniteAtomicOffHeapRetriesBenchmark.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/failover/IgniteAtomicOffHeapRetriesBenchmark.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/failover/IgniteAtomicOffHeapRetriesBenchmark.java
deleted file mode 100644
index ebb9eac..0000000
--- a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/failover/IgniteAtomicOffHeapRetriesBenchmark.java
+++ /dev/null
@@ -1,31 +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.yardstick.cache.failover;
-
-/**
- * Atomic retries failover benchmark.
- * <p>
- * Client generates continuous load to the cluster (random get, put, invoke, remove
- * operations).
- */
-public class IgniteAtomicOffHeapRetriesBenchmark extends IgniteAtomicRetriesBenchmark {
- /** {@inheritDoc} */
- @Override protected String cacheName() {
- return "atomic-offheap-reties";
- }
-}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/failover/IgniteTransactionalOffHeapInvokeRetryBenchmark.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/failover/IgniteTransactionalOffHeapInvokeRetryBenchmark.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/failover/IgniteTransactionalOffHeapInvokeRetryBenchmark.java
deleted file mode 100644
index 4cbcf67..0000000
--- a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/failover/IgniteTransactionalOffHeapInvokeRetryBenchmark.java
+++ /dev/null
@@ -1,33 +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.yardstick.cache.failover;
-
-/**
- * Invoke retry failover benchmark.
- * <p>
- * Each client maintains a local map that it updates together with cache.
- * Client invokes an increment closure for all generated keys and atomically increments value for corresponding
- * keys in the local map. To validate cache contents, all writes from the client are stopped, values in
- * the local map are compared to the values in the cache.
- */
-public class IgniteTransactionalOffHeapInvokeRetryBenchmark extends IgniteTransactionalInvokeRetryBenchmark {
- /** {@inheritDoc} */
- @Override protected String cacheName() {
- return "tx-offheap-invoke-retry";
- }
-}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/failover/IgniteTransactionalOffHeapWriteInvokeBenchmark.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/failover/IgniteTransactionalOffHeapWriteInvokeBenchmark.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/failover/IgniteTransactionalOffHeapWriteInvokeBenchmark.java
deleted file mode 100644
index 7fa2d1a..0000000
--- a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/failover/IgniteTransactionalOffHeapWriteInvokeBenchmark.java
+++ /dev/null
@@ -1,37 +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.yardstick.cache.failover;
-
-/**
- * Transactional write invoke failover benchmark.
- * <p>
- * Each client generates a random integer K in a limited range and creates keys in the form 'key-' + K + 'master',
- * 'key-' + K + '-1', 'key-' + K + '-2', ... Then client starts a pessimistic repeatable read transaction
- * and randomly chooses between read and write scenarios:
- * <ul>
- * <li>Reads value associated with the master key and child keys. Values must be equal.</li>
- * <li>Reads value associated with the master key, increments it by 1 and puts the value, then invokes increment
- * closure on child keys. No validation is performed.</li>
- * </ul>
- */
-public class IgniteTransactionalOffHeapWriteInvokeBenchmark extends IgniteTransactionalWriteInvokeBenchmark {
- /** {@inheritDoc} */
- @Override protected String cacheName() {
- return "tx-offheap-write-invoke";
- }
-}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/failover/IgniteTransactionalOffHeapWriteReadBenchmark.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/failover/IgniteTransactionalOffHeapWriteReadBenchmark.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/failover/IgniteTransactionalOffHeapWriteReadBenchmark.java
deleted file mode 100644
index bdecca7..0000000
--- a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/failover/IgniteTransactionalOffHeapWriteReadBenchmark.java
+++ /dev/null
@@ -1,32 +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.yardstick.cache.failover;
-
-/**
- * Transactional write read failover benchmark.
- * <p>
- * Each client generates a random integer K in a limited range and creates keys in the form 'key-' + K + '-1',
- * 'key-' + K + '-2', ... Then client starts a pessimistic repeatable read transaction, reads value associated with
- * each key. Values must be equal. Client increments value by 1, commits the transaction.
- */
-public class IgniteTransactionalOffHeapWriteReadBenchmark extends IgniteTransactionalWriteReadBenchmark {
- /** {@inheritDoc} */
- @Override protected String cacheName() {
- return "tx-offheap-write-read";
- }
-}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/load/IgniteCacheRandomOperationBenchmark.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/load/IgniteCacheRandomOperationBenchmark.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/load/IgniteCacheRandomOperationBenchmark.java
index 437d309..4010f5e 100644
--- a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/load/IgniteCacheRandomOperationBenchmark.java
+++ b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/load/IgniteCacheRandomOperationBenchmark.java
@@ -47,7 +47,6 @@ import org.apache.ignite.IgniteDataStreamer;
import org.apache.ignite.IgniteException;
import org.apache.ignite.cache.CacheAtomicityMode;
import org.apache.ignite.cache.CacheEntryEventSerializableFilter;
-import org.apache.ignite.cache.CacheMemoryMode;
import org.apache.ignite.cache.CacheMode;
import org.apache.ignite.cache.QueryEntity;
import org.apache.ignite.cache.QueryIndex;
@@ -253,12 +252,6 @@ public class IgniteCacheRandomOperationBenchmark extends IgniteAbstractBenchmark
CacheConfiguration configuration = cache.getConfiguration(CacheConfiguration.class);
if (isClassDefinedInConfig(configuration)) {
- if (configuration.getMemoryMode() == CacheMemoryMode.OFFHEAP_TIERED &&
- configuration.getQueryEntities().size() > 2) {
- throw new IgniteException("Off-heap mode is unsupported by the load test due to bugs IGNITE-2982" +
- " and IGNITE-2997");
- }
-
ArrayList<Class> keys = new ArrayList<>();
ArrayList<Class> values = new ArrayList<>();
[03/17] ignite git commit: IGNITE-4535 - Add option to store
deserialized values on-heap
Posted by ag...@apache.org.
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheOffheapBatchIndexingSingleTypeTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheOffheapBatchIndexingSingleTypeTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheOffheapBatchIndexingSingleTypeTest.java
index c59e5fe..acf33dc 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheOffheapBatchIndexingSingleTypeTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheOffheapBatchIndexingSingleTypeTest.java
@@ -41,7 +41,7 @@ public class CacheOffheapBatchIndexingSingleTypeTest extends CacheOffheapBatchIn
public void testBatchRemove() throws Exception {
Ignite ignite = grid(0);
- CacheConfiguration<Object, Object> ccfg = cacheConfiguration(1,
+ CacheConfiguration<Object, Object> ccfg = cacheConfiguration(
new Class<?>[] {Integer.class, CacheOffheapBatchIndexingBaseTest.Organization.class});
final IgniteCache<Object, Object> cache = ignite.createCache(ccfg);
@@ -88,18 +88,6 @@ public class CacheOffheapBatchIndexingSingleTypeTest extends CacheOffheapBatchIn
doStreamerBatchTest(50,
1_000,
new Class<?>[] {Integer.class, CacheOffheapBatchIndexingBaseTest.Organization.class},
- 1,
- true);
- }
-
- /**
- *
- */
- public void testPutAllAndStreamerDfltOffHeapRowCacheSize() {
- doStreamerBatchTest(50,
- 1_000,
- new Class<?>[] {Integer.class, CacheOffheapBatchIndexingBaseTest.Organization.class},
- CacheConfiguration.DFLT_SQL_ONHEAP_ROW_CACHE_SIZE,
true);
}
@@ -110,7 +98,6 @@ public class CacheOffheapBatchIndexingSingleTypeTest extends CacheOffheapBatchIn
doStreamerBatchTest(50,
1_000,
new Class<?>[] {Integer.class, CacheOffheapBatchIndexingBaseTest.Organization.class},
- 1,
false);
}
@@ -118,18 +105,17 @@ public class CacheOffheapBatchIndexingSingleTypeTest extends CacheOffheapBatchIn
* @param iterations Number of iterations.
* @param entitiesCnt Number of entities to put.
* @param entityClasses Entity classes.
- * @param onHeapRowCacheSize Cache size.
+
* @param preloadInStreamer Data preload flag.
*/
private void doStreamerBatchTest(int iterations,
int entitiesCnt,
Class<?>[] entityClasses,
- int onHeapRowCacheSize,
boolean preloadInStreamer) {
Ignite ignite = grid(0);
final IgniteCache<Object, Object> cache =
- ignite.createCache(cacheConfiguration(onHeapRowCacheSize, entityClasses));
+ ignite.createCache(cacheConfiguration(entityClasses));
try {
if (preloadInStreamer)
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheOperationsWithExpirationTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheOperationsWithExpirationTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheOperationsWithExpirationTest.java
index 7db8b9c..33c82b7 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheOperationsWithExpirationTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheOperationsWithExpirationTest.java
@@ -28,7 +28,6 @@ import javax.cache.expiry.ModifiedExpiryPolicy;
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.query.SqlFieldsQuery;
import org.apache.ignite.cache.query.annotations.QuerySqlField;
import org.apache.ignite.configuration.CacheConfiguration;
@@ -41,9 +40,6 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
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.OFFHEAP_TIERED;
-import static org.apache.ignite.cache.CacheMemoryMode.ONHEAP_TIERED;
import static org.apache.ignite.cache.CacheWriteSynchronizationMode.PRIMARY_SYNC;
/**
@@ -55,20 +51,16 @@ public class CacheOperationsWithExpirationTest extends GridCommonAbstractTest {
/**
* @param atomicityMode Atomicity mode.
- * @param memoryMode Memory mode.
* @param offheapMem Offheap memory size.
* @param idx Indexing enabled flag.
* @return Cache configuration.
*/
private CacheConfiguration<String, TestIndexedType> cacheConfiguration(CacheAtomicityMode atomicityMode,
- CacheMemoryMode memoryMode,
long offheapMem,
boolean idx) {
CacheConfiguration<String, TestIndexedType> ccfg = new CacheConfiguration<>();
ccfg.setAtomicityMode(atomicityMode);
- ccfg.setMemoryMode(memoryMode);
- ccfg.setOffHeapMaxMemory(offheapMem);
ccfg.setBackups(1);
ccfg.setAtomicWriteOrderMode(PRIMARY);
ccfg.setWriteSynchronizationMode(PRIMARY_SYNC);
@@ -97,71 +89,15 @@ public class CacheOperationsWithExpirationTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
- public void testAtomicOffheapLimitedIndexEnabled() throws Exception {
- concurrentPutGetRemoveExpireAndQuery(cacheConfiguration(ATOMIC, OFFHEAP_TIERED, 1024 * 1024, true));
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testAtomicOffheapIndexEnabled() throws Exception {
- concurrentPutGetRemoveExpireAndQuery(cacheConfiguration(ATOMIC, OFFHEAP_TIERED, 0, true));
- }
-
- /**
- * @throws Exception If failed.
- */
public void testAtomicIndexEnabled() throws Exception {
- concurrentPutGetRemoveExpireAndQuery(cacheConfiguration(ATOMIC, ONHEAP_TIERED, 0, true));
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testTxOffheapLimitedIndexEnabled() throws Exception {
- concurrentPutGetRemoveExpireAndQuery(cacheConfiguration(TRANSACTIONAL, OFFHEAP_TIERED, 1024 * 1024, true));
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testTxOffheapIndexEnabled() throws Exception {
- concurrentPutGetRemoveExpireAndQuery(cacheConfiguration(TRANSACTIONAL, OFFHEAP_TIERED, 0, true));
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testAtomicOffheapLimited() throws Exception {
- concurrentPutGetRemoveExpireAndQuery(cacheConfiguration(ATOMIC, OFFHEAP_TIERED, 1024 * 1024, false));
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testAtomicOffheap() throws Exception {
- concurrentPutGetRemoveExpireAndQuery(cacheConfiguration(ATOMIC, OFFHEAP_TIERED, 0, false));
+ concurrentPutGetRemoveExpireAndQuery(cacheConfiguration(ATOMIC, 0, true));
}
/**
* @throws Exception If failed.
*/
public void testAtomic() throws Exception {
- concurrentPutGetRemoveExpireAndQuery(cacheConfiguration(ATOMIC, ONHEAP_TIERED, 0, false));
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testTxOffheapLimited() throws Exception {
- concurrentPutGetRemoveExpireAndQuery(cacheConfiguration(TRANSACTIONAL, OFFHEAP_TIERED, 1024 * 1024, false));
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testTxOffheap() throws Exception {
- concurrentPutGetRemoveExpireAndQuery(cacheConfiguration(TRANSACTIONAL, OFFHEAP_TIERED, 0, false));
+ concurrentPutGetRemoveExpireAndQuery(cacheConfiguration(ATOMIC, 0, false));
}
/**
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheQueryEvictDataLostTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheQueryEvictDataLostTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheQueryEvictDataLostTest.java
new file mode 100644
index 0000000..7b79c72
--- /dev/null
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheQueryEvictDataLostTest.java
@@ -0,0 +1,120 @@
+/*
+ * 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.io.Serializable;
+import java.util.concurrent.ThreadLocalRandom;
+import org.apache.ignite.IgniteCache;
+import org.apache.ignite.cache.eviction.lru.LruEvictionPolicy;
+import org.apache.ignite.cache.query.SqlQuery;
+import org.apache.ignite.cache.query.annotations.QuerySqlField;
+import org.apache.ignite.configuration.CacheConfiguration;
+import org.apache.ignite.configuration.IgniteConfiguration;
+import org.apache.ignite.internal.util.typedef.internal.U;
+import org.apache.ignite.lang.IgniteInClosure;
+import org.apache.ignite.testframework.GridTestUtils;
+import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
+
+/**
+ *
+ */
+public class CacheQueryEvictDataLostTest extends GridCommonAbstractTest {
+ /** */
+ private static final int KEYS = 100_000;
+
+ /**
+ *
+ */
+ public CacheQueryEvictDataLostTest() {
+ super(true);
+ }
+
+ /** {@inheritDoc} */
+ @Override protected IgniteConfiguration getConfiguration() throws Exception {
+ IgniteConfiguration cfg = super.getConfiguration();
+
+ CacheConfiguration<Object, Object> ccfg = new CacheConfiguration<>();
+
+ ccfg.setName("cache-1");
+ ccfg.setEvictionPolicy(new LruEvictionPolicy(10));
+ ccfg.setOnheapCacheEnabled(true);
+ ccfg.setIndexedTypes(Integer.class, TestData.class);
+
+ cfg.setCacheConfiguration(ccfg);
+
+ return cfg;
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testQueryDataLost() throws Exception {
+ final long stopTime = U.currentTimeMillis() + 30_000;
+
+ GridTestUtils.runMultiThreaded(new IgniteInClosure<Integer>() {
+ void putGet(IgniteCache<Object, Object> cache) {
+ ThreadLocalRandom rnd = ThreadLocalRandom.current();
+
+ for (int i = 0; i < KEYS; i++) {
+ cache.put(rnd.nextInt(KEYS), new TestData(i));
+
+ cache.get(rnd.nextInt(KEYS));
+ }
+ }
+
+ void query(IgniteCache<Object, Object> cache) {
+ SqlQuery<Object, Object> qry1 = new SqlQuery<>(TestData.class, "_key > ?");
+ qry1.setArgs(KEYS / 2);
+
+ cache.query(qry1).getAll();
+
+ SqlQuery<Object, Object> qry2 = new SqlQuery<>(TestData.class, "idxVal > ?");
+ qry2.setArgs(KEYS / 2);
+
+ cache.query(qry2).getAll();
+ }
+
+ @Override public void apply(Integer idx) {
+ IgniteCache<Object, Object> cache1 = grid().cache("cache-1");
+
+ while (U.currentTimeMillis() < stopTime) {
+ if (idx == 0)
+ putGet(cache1);
+ else
+ query(cache1);
+ }
+ }
+ }, 10, "test-thread");
+ }
+
+ /**
+ *
+ */
+ static class TestData implements Serializable {
+ /** */
+ @QuerySqlField(index = true)
+ private int idxVal;
+
+ /**
+ * @param idxVal Value.
+ */
+ public TestData(int idxVal) {
+ this.idxVal = idxVal;
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheQueryOffheapEvictDataLostTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheQueryOffheapEvictDataLostTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheQueryOffheapEvictDataLostTest.java
deleted file mode 100644
index 3867b20..0000000
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheQueryOffheapEvictDataLostTest.java
+++ /dev/null
@@ -1,136 +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.io.Serializable;
-import java.util.concurrent.ThreadLocalRandom;
-import org.apache.ignite.IgniteCache;
-import org.apache.ignite.cache.eviction.lru.LruEvictionPolicy;
-import org.apache.ignite.cache.query.SqlQuery;
-import org.apache.ignite.cache.query.annotations.QuerySqlField;
-import org.apache.ignite.configuration.CacheConfiguration;
-import org.apache.ignite.configuration.IgniteConfiguration;
-import org.apache.ignite.internal.util.typedef.internal.U;
-import org.apache.ignite.lang.IgniteInClosure;
-import org.apache.ignite.testframework.GridTestUtils;
-import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
-
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
-import static org.apache.ignite.cache.CacheMemoryMode.ONHEAP_TIERED;
-
-/**
- *
- */
-public class CacheQueryOffheapEvictDataLostTest extends GridCommonAbstractTest {
- /** */
- private static final int KEYS = 100_000;
-
- /**
- *
- */
- public CacheQueryOffheapEvictDataLostTest() {
- super(true);
- }
-
- /** {@inheritDoc} */
- @Override protected IgniteConfiguration getConfiguration() throws Exception {
- IgniteConfiguration cfg = super.getConfiguration();
-
- CacheConfiguration<Object, Object> ccfg1 = new CacheConfiguration<>();
-
- ccfg1.setName("cache-1");
- ccfg1.setMemoryMode(OFFHEAP_TIERED);
- ccfg1.setOffHeapMaxMemory(1024);
- ccfg1.setIndexedTypes(Integer.class, TestData.class);
-
- CacheConfiguration<Object, Object> ccfg2 = new CacheConfiguration<>();
-
- ccfg2.setName("cache-2");
- ccfg2.setMemoryMode(ONHEAP_TIERED);
- ccfg2.setEvictionPolicy(new LruEvictionPolicy(10));
- ccfg2.setOffHeapMaxMemory(1024);
- ccfg2.setIndexedTypes(Integer.class, TestData.class);
-
- cfg.setCacheConfiguration(ccfg1, ccfg2);
-
- return cfg;
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testQueryDataLost() throws Exception {
- final long stopTime = U.currentTimeMillis() + 30_000;
-
- GridTestUtils.runMultiThreaded(new IgniteInClosure<Integer>() {
- void putGet(IgniteCache<Object, Object> cache) {
- ThreadLocalRandom rnd = ThreadLocalRandom.current();
-
- for (int i = 0; i < KEYS; i++) {
- cache.put(rnd.nextInt(KEYS), new TestData(i));
-
- cache.get(rnd.nextInt(KEYS));
- }
- }
-
- void query(IgniteCache<Object, Object> cache) {
- SqlQuery<Object, Object> qry1 = new SqlQuery<>(TestData.class, "_key > ?");
- qry1.setArgs(KEYS / 2);
-
- cache.query(qry1).getAll();
-
- SqlQuery<Object, Object> qry2 = new SqlQuery<>(TestData.class, "idxVal > ?");
- qry2.setArgs(KEYS / 2);
-
- cache.query(qry2).getAll();
- }
-
- @Override public void apply(Integer idx) {
- IgniteCache<Object, Object> cache1 = grid().cache("cache-1");
- IgniteCache<Object, Object> cache2 = grid().cache("cache-2");
-
- while (U.currentTimeMillis() < stopTime) {
- if (idx == 0) {
- putGet(cache1);
- putGet(cache2);
- }
- else {
- query(cache1);
- query(cache2);
- }
- }
- }
- }, 10, "test-thread");
- }
-
- /**
- *
- */
- static class TestData implements Serializable {
- /** */
- @QuerySqlField(index = true)
- private int idxVal;
-
- /**
- * @param idxVal Value.
- */
- public TestData(int idxVal) {
- this.idxVal = idxVal;
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheRandomOperationsMultithreadedTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheRandomOperationsMultithreadedTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheRandomOperationsMultithreadedTest.java
index 2c2cf65..9861153 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheRandomOperationsMultithreadedTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheRandomOperationsMultithreadedTest.java
@@ -28,7 +28,6 @@ import javax.cache.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.cache.eviction.EvictionPolicy;
import org.apache.ignite.cache.eviction.lru.LruEvictionPolicy;
@@ -51,8 +50,6 @@ import org.jetbrains.annotations.Nullable;
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.OFFHEAP_TIERED;
-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;
@@ -104,36 +101,9 @@ public class CacheRandomOperationsMultithreadedTest extends GridCommonAbstractTe
/**
* @throws Exception If failed.
*/
- public void testAtomicOffheapTiered() throws Exception {
- CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
- ATOMIC,
- OFFHEAP_TIERED,
- null,
- false);
-
- randomOperations(ccfg);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testAtomicOffheapTieredIndexing() throws Exception {
- CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
- ATOMIC,
- OFFHEAP_TIERED,
- null,
- true);
-
- randomOperations(ccfg);
- }
-
- /**
- * @throws Exception If failed.
- */
public void testAtomicOffheapEviction() throws Exception {
CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
ATOMIC,
- ONHEAP_TIERED,
new LruEvictionPolicy<>(10),
false);
@@ -146,7 +116,6 @@ public class CacheRandomOperationsMultithreadedTest extends GridCommonAbstractTe
public void testAtomicOffheapEvictionIndexing() throws Exception {
CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
ATOMIC,
- ONHEAP_TIERED,
new LruEvictionPolicy<>(10),
true);
@@ -156,36 +125,9 @@ public class CacheRandomOperationsMultithreadedTest extends GridCommonAbstractTe
/**
* @throws Exception If failed.
*/
- public void testTxOffheapTiered() throws Exception {
- CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
- TRANSACTIONAL,
- OFFHEAP_TIERED,
- null,
- false);
-
- randomOperations(ccfg);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testTxOffheapTieredIndexing() throws Exception {
- CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
- TRANSACTIONAL,
- OFFHEAP_TIERED,
- null,
- true);
-
- randomOperations(ccfg);
- }
-
- /**
- * @throws Exception If failed.
- */
public void testTxOffheapEviction() throws Exception {
CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
TRANSACTIONAL,
- ONHEAP_TIERED,
new LruEvictionPolicy<>(10),
false);
@@ -198,7 +140,6 @@ public class CacheRandomOperationsMultithreadedTest extends GridCommonAbstractTe
public void testTxOffheapEvictionIndexing() throws Exception {
CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
TRANSACTIONAL,
- ONHEAP_TIERED,
new LruEvictionPolicy<>(10),
true);
@@ -391,7 +332,6 @@ public class CacheRandomOperationsMultithreadedTest extends GridCommonAbstractTe
/**
* @param cacheMode Cache mode.
* @param atomicityMode Cache atomicity mode.
- * @param memoryMode Cache memory mode.
* @param evictionPlc Eviction policy.
* @param indexing Indexing flag.
* @return Cache configuration.
@@ -399,18 +339,16 @@ public class CacheRandomOperationsMultithreadedTest extends GridCommonAbstractTe
private CacheConfiguration<Object, Object> cacheConfiguration(
CacheMode cacheMode,
CacheAtomicityMode atomicityMode,
- CacheMemoryMode memoryMode,
@Nullable EvictionPolicy<Object, Object> evictionPlc,
boolean indexing) {
CacheConfiguration<Object, Object> ccfg = new CacheConfiguration<>();
ccfg.setAtomicityMode(atomicityMode);
ccfg.setCacheMode(cacheMode);
- ccfg.setMemoryMode(memoryMode);
ccfg.setWriteSynchronizationMode(FULL_SYNC);
ccfg.setAtomicWriteOrderMode(PRIMARY);
ccfg.setEvictionPolicy(evictionPlc);
- ccfg.setOffHeapMaxMemory(0);
+ ccfg.setOnheapCacheEnabled(evictionPlc != null);
if (cacheMode == PARTITIONED)
ccfg.setBackups(1);
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ClientReconnectAfterClusterRestartTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ClientReconnectAfterClusterRestartTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ClientReconnectAfterClusterRestartTest.java
index 20b947b..392cdc7 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ClientReconnectAfterClusterRestartTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ClientReconnectAfterClusterRestartTest.java
@@ -23,7 +23,6 @@ import org.apache.ignite.IgniteDataStreamer;
import org.apache.ignite.binary.BinaryObject;
import org.apache.ignite.binary.BinaryObjectBuilder;
import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMemoryMode;
import org.apache.ignite.cache.CacheMode;
import org.apache.ignite.cache.QueryEntity;
import org.apache.ignite.cache.QueryIndex;
@@ -32,7 +31,9 @@ import org.apache.ignite.configuration.IgniteConfiguration;
import org.apache.ignite.events.Event;
import org.apache.ignite.events.EventType;
import org.apache.ignite.internal.binary.BinaryMarshaller;
+import org.apache.ignite.internal.util.lang.GridAbsPredicate;
import org.apache.ignite.lang.IgnitePredicate;
+import org.apache.ignite.testframework.GridTestUtils;
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
import org.jetbrains.annotations.NotNull;
@@ -76,7 +77,6 @@ public class ClientReconnectAfterClusterRestartTest extends GridCommonAbstractTe
ccfg.setName(CACHE_PARAMS);
ccfg.setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL);
ccfg.setCacheMode(CacheMode.PARTITIONED);
- ccfg.setMemoryMode(CacheMemoryMode.OFFHEAP_TIERED);
List<QueryEntity> queryEntities = new ArrayList<>();
@@ -161,9 +161,17 @@ public class ClientReconnectAfterClusterRestartTest extends GridCommonAbstractTe
startGrid(0);
- Thread.sleep(2_000);
+ assert GridTestUtils.waitForCondition(new GridAbsPredicate() {
+ @Override public boolean apply() {
+ try {
+ checkTopology(2);
- checkTopology(2);
+ return true;
+ } catch (Exception ex) {
+ return false;
+ }
+ }
+ }, 30_000);
info("Pre-insert");
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapSelfTest.java
index 2c083fb..148ce74 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapSelfTest.java
@@ -87,7 +87,6 @@ public class GridCacheOffHeapSelfTest extends GridCommonAbstractTest {
cacheCfg.setWriteSynchronizationMode(FULL_SYNC);
cacheCfg.setCacheMode(REPLICATED);
- cacheCfg.setOffHeapMaxMemory(1024L * 1024L * 1024L);
cacheCfg.setIndexedTypes(Integer.class, CacheValue.class);
cfg.setCacheConfiguration(cacheCfg);
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffheapIndexEntryEvictTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffheapIndexEntryEvictTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffheapIndexEntryEvictTest.java
index dc0083d..d64aa7c 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffheapIndexEntryEvictTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffheapIndexEntryEvictTest.java
@@ -35,7 +35,6 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
import static org.apache.ignite.cache.CacheMode.PARTITIONED;
import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
@@ -63,11 +62,8 @@ public class GridCacheOffheapIndexEntryEvictTest extends GridCommonAbstractTest
cacheCfg.setWriteSynchronizationMode(FULL_SYNC);
cacheCfg.setCacheMode(PARTITIONED);
cacheCfg.setBackups(1);
- cacheCfg.setOffHeapMaxMemory(0);
cacheCfg.setAtomicityMode(TRANSACTIONAL);
- cacheCfg.setMemoryMode(OFFHEAP_TIERED);
cacheCfg.setEvictionPolicy(null);
- cacheCfg.setSqlOnheapRowCacheSize(10);
cacheCfg.setIndexedTypes(Integer.class, TestValue.class);
cacheCfg.setNearConfiguration(null);
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffheapIndexGetSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffheapIndexGetSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffheapIndexGetSelfTest.java
index c55f51c..f9e555e 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffheapIndexGetSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffheapIndexGetSelfTest.java
@@ -38,7 +38,6 @@ import org.apache.ignite.transactions.TransactionConcurrency;
import org.apache.ignite.transactions.TransactionIsolation;
import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
import static org.apache.ignite.cache.CacheMode.PARTITIONED;
import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
import static org.apache.ignite.configuration.DeploymentMode.SHARED;
@@ -48,9 +47,6 @@ import static org.apache.ignite.configuration.DeploymentMode.SHARED;
*/
public class GridCacheOffheapIndexGetSelfTest extends GridCommonAbstractTest {
/** */
- private static final long OFFHEAP_MEM = 10L * 1024L;
-
- /** */
private final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true);
/** {@inheritDoc} */
@@ -79,11 +75,7 @@ public class GridCacheOffheapIndexGetSelfTest extends GridCommonAbstractTest {
cacheCfg.setWriteSynchronizationMode(FULL_SYNC);
cacheCfg.setCacheMode(PARTITIONED);
cacheCfg.setBackups(1);
- cacheCfg.setOffHeapMaxMemory(OFFHEAP_MEM);
- cacheCfg.setEvictSynchronized(true);
- cacheCfg.setEvictSynchronizedKeyBufferSize(1);
cacheCfg.setAtomicityMode(TRANSACTIONAL);
- cacheCfg.setMemoryMode(OFFHEAP_TIERED);
cacheCfg.setEvictionPolicy(null);
return cacheCfg;
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQuerySimpleBenchmark.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQuerySimpleBenchmark.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQuerySimpleBenchmark.java
index b729336..17ee024 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQuerySimpleBenchmark.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQuerySimpleBenchmark.java
@@ -26,7 +26,6 @@ import java.util.concurrent.atomic.AtomicBoolean;
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.query.SqlFieldsQuery;
import org.apache.ignite.cache.query.annotations.QuerySqlField;
@@ -71,8 +70,6 @@ public class GridCacheQuerySimpleBenchmark extends GridCommonAbstractTest {
Long.class, Person.class
);
- ccfg.setMemoryMode(CacheMemoryMode.OFFHEAP_TIERED);
-
c.setCacheConfiguration(ccfg);
return c;
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridIndexingWithNoopSwapSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridIndexingWithNoopSwapSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridIndexingWithNoopSwapSelfTest.java
index 8f24670..d16e8bb 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridIndexingWithNoopSwapSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridIndexingWithNoopSwapSelfTest.java
@@ -67,6 +67,7 @@ public class GridIndexingWithNoopSwapSelfTest extends GridCommonAbstractTest {
plc.setMaxSize(1000);
cc.setEvictionPolicy(plc);
+ cc.setOnheapCacheEnabled(true);
cc.setBackups(1);
cc.setAtomicityMode(TRANSACTIONAL);
cc.setIndexedTypes(
@@ -108,6 +109,6 @@ public class GridIndexingWithNoopSwapSelfTest extends GridCommonAbstractTest {
SqlQuery<Integer, ObjectValue> qry =
new SqlQuery(ObjectValue.class, "intVal >= ? order by intVal");
- assertEquals(0, cache.query(qry.setArgs(0)).getAll().size());
+ assertEquals(10, cache.query(qry.setArgs(0)).getAll().size());
}
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteBinaryObjectQueryArgumentsOffheapLocalTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteBinaryObjectQueryArgumentsOffheapLocalTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteBinaryObjectQueryArgumentsOffheapLocalTest.java
deleted file mode 100644
index 560d258..0000000
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteBinaryObjectQueryArgumentsOffheapLocalTest.java
+++ /dev/null
@@ -1,28 +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;
-
-/**
- *
- */
-public class IgniteBinaryObjectQueryArgumentsOffheapLocalTest extends IgniteBinaryObjectQueryArgumentsOffheapTest {
- /** {@inheritDoc} */
- @Override protected boolean isLocal() {
- return true;
- }
-}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteBinaryObjectQueryArgumentsOffheapTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteBinaryObjectQueryArgumentsOffheapTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteBinaryObjectQueryArgumentsOffheapTest.java
deleted file mode 100644
index d1428ae..0000000
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteBinaryObjectQueryArgumentsOffheapTest.java
+++ /dev/null
@@ -1,30 +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 org.apache.ignite.cache.CacheMemoryMode;
-
-/**
- *
- */
-public class IgniteBinaryObjectQueryArgumentsOffheapTest extends IgniteBinaryObjectQueryArgumentsTest {
- /** {@inheritDoc} */
- @Override protected CacheMemoryMode memoryMode() {
- return CacheMemoryMode.OFFHEAP_TIERED;
- }
-}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteBinaryObjectQueryArgumentsTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteBinaryObjectQueryArgumentsTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteBinaryObjectQueryArgumentsTest.java
index 390a090..9d18b62 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteBinaryObjectQueryArgumentsTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteBinaryObjectQueryArgumentsTest.java
@@ -30,7 +30,6 @@ import java.util.concurrent.ThreadLocalRandom;
import javax.cache.Cache;
import org.apache.ignite.IgniteCache;
-import org.apache.ignite.cache.CacheMemoryMode;
import org.apache.ignite.cache.QueryEntity;
import org.apache.ignite.cache.query.SqlFieldsQuery;
import org.apache.ignite.cache.query.SqlQuery;
@@ -103,13 +102,6 @@ public class IgniteBinaryObjectQueryArgumentsTest extends GridCommonAbstractTest
}
/**
- * @return Memory mode.
- */
- protected CacheMemoryMode memoryMode() {
- return CacheMemoryMode.ONHEAP_TIERED;
- }
-
- /**
* @param cacheName Cache name.
* @return Cache config.
*/
@@ -124,8 +116,6 @@ public class IgniteBinaryObjectQueryArgumentsTest extends GridCommonAbstractTest
ccfg.setQueryEntities(Collections.singletonList(person));
- ccfg.setMemoryMode(memoryMode());
-
ccfg.setName(cacheName);
return ccfg;
@@ -178,7 +168,6 @@ public class IgniteBinaryObjectQueryArgumentsTest extends GridCommonAbstractTest
cfg.setName(cacheName);
- cfg.setMemoryMode(memoryMode());
cfg.setIndexedTypes(key, val);
return cfg;
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheDistributedJoinQueryConditionsTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheDistributedJoinQueryConditionsTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheDistributedJoinQueryConditionsTest.java
index ccac8ea..200ca87 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheDistributedJoinQueryConditionsTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheDistributedJoinQueryConditionsTest.java
@@ -23,7 +23,6 @@ import java.util.List;
import java.util.concurrent.atomic.AtomicInteger;
import org.apache.ignite.Ignite;
import org.apache.ignite.IgniteCache;
-import org.apache.ignite.cache.CacheMemoryMode;
import org.apache.ignite.cache.QueryEntity;
import org.apache.ignite.cache.QueryIndex;
import org.apache.ignite.cache.affinity.Affinity;
@@ -40,8 +39,6 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
import static org.apache.ignite.cache.CacheAtomicWriteOrderMode.PRIMARY;
import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
-import static org.apache.ignite.cache.CacheMemoryMode.ONHEAP_TIERED;
import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
/**
@@ -63,9 +60,6 @@ public class IgniteCacheDistributedJoinQueryConditionsTest extends GridCommonAbs
/** */
private int total;
- /** */
- private CacheMemoryMode memMode = ONHEAP_TIERED;
-
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
@@ -105,15 +99,6 @@ public class IgniteCacheDistributedJoinQueryConditionsTest extends GridCommonAbs
}
/**
- * @throws Exception If failed.
- */
- public void testJoinQuery1Offheap() throws Exception {
- memMode = OFFHEAP_TIERED;
-
- testJoinQuery1();
- }
-
- /**
* @param idx Use index flag.
* @throws Exception If failed.
*/
@@ -582,7 +567,6 @@ public class IgniteCacheDistributedJoinQueryConditionsTest extends GridCommonAbs
ccfg.setAtomicWriteOrderMode(PRIMARY);
ccfg.setAtomicityMode(ATOMIC);
ccfg.setBackups(0);
- ccfg.setMemoryMode(memMode);
return ccfg;
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapEvictQueryTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapEvictQueryTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapEvictQueryTest.java
index cb25c5f..22856b5 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapEvictQueryTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapEvictQueryTest.java
@@ -24,7 +24,6 @@ import java.util.concurrent.atomic.AtomicInteger;
import javax.cache.CacheException;
import org.apache.ignite.IgniteCache;
import org.apache.ignite.IgniteInterruptedException;
-import org.apache.ignite.cache.CacheMemoryMode;
import org.apache.ignite.cache.CachePeekMode;
import org.apache.ignite.cache.CacheWriteSynchronizationMode;
import org.apache.ignite.cache.query.SqlFieldsQuery;
@@ -66,18 +65,13 @@ public class IgniteCacheOffheapEvictQueryTest extends GridCommonAbstractTest {
cacheCfg.setAtomicityMode(TRANSACTIONAL);
cacheCfg.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC);
cacheCfg.setBackups(0);
- cacheCfg.setMemoryMode(CacheMemoryMode.ONHEAP_TIERED);
cacheCfg.setEvictionPolicy(null);
cacheCfg.setNearConfiguration(null);
- cacheCfg.setSqlOnheapRowCacheSize(128);
-
cacheCfg.setIndexedTypes(
Integer.class, Integer.class
);
- cacheCfg.setOffHeapMaxMemory(2000); // Small offheap for evictions from offheap to swap.
-
cfg.setCacheConfiguration(cacheCfg);
return cfg;
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapIndexScanTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapIndexScanTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapIndexScanTest.java
index 7cea826..6f46d33 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapIndexScanTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapIndexScanTest.java
@@ -21,7 +21,6 @@ import java.io.Serializable;
import java.util.concurrent.Callable;
import java.util.concurrent.atomic.AtomicBoolean;
import org.apache.ignite.IgniteCache;
-import org.apache.ignite.cache.CacheMemoryMode;
import org.apache.ignite.cache.query.SqlFieldsQuery;
import org.apache.ignite.cache.query.annotations.QuerySqlField;
import org.apache.ignite.configuration.CacheConfiguration;
@@ -57,8 +56,6 @@ public class IgniteCacheOffheapIndexScanTest extends GridCommonAbstractTest {
CacheConfiguration<?,?> cacheCfg = new CacheConfiguration<>();
cacheCfg.setCacheMode(LOCAL);
- cacheCfg.setMemoryMode(CacheMemoryMode.OFFHEAP_TIERED);
- cacheCfg.setSqlOnheapRowCacheSize(256);
cacheCfg.setIndexedTypes(
Integer.class, Person.class
);
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapTieredMultithreadedSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapTieredMultithreadedSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapTieredMultithreadedSelfTest.java
deleted file mode 100644
index f0551cd..0000000
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapTieredMultithreadedSelfTest.java
+++ /dev/null
@@ -1,301 +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.io.Serializable;
-import java.util.Collection;
-import java.util.concurrent.Callable;
-import java.util.concurrent.ThreadLocalRandom;
-import java.util.concurrent.atomic.AtomicBoolean;
-import javax.cache.Cache;
-import org.apache.ignite.IgniteCache;
-import org.apache.ignite.cache.CacheMemoryMode;
-import org.apache.ignite.cache.query.SqlQuery;
-import org.apache.ignite.cache.query.annotations.QuerySqlField;
-import org.apache.ignite.configuration.CacheConfiguration;
-import org.apache.ignite.configuration.IgniteConfiguration;
-import org.apache.ignite.internal.IgniteInternalFuture;
-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.junits.common.GridCommonAbstractTest;
-
-import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
-import static org.apache.ignite.cache.CacheMode.PARTITIONED;
-
-/**
- * Based on Yardstick benchmark.
- */
-public class IgniteCacheOffheapTieredMultithreadedSelfTest extends GridCommonAbstractTest {
- /** */
- private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true);
-
- /** */
- private static final int RANGE = 1_000_000;
-
- /** */
- private static IgniteCache<Integer, Object> cache;
-
- /** {@inheritDoc} */
- @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
- IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
-
- TcpDiscoverySpi disco = new TcpDiscoverySpi();
-
- disco.setIpFinder(ipFinder);
-
- cfg.setDiscoverySpi(disco);
-
- CacheConfiguration<?,?> cacheCfg = new CacheConfiguration<>();
-
- cacheCfg.setCacheMode(PARTITIONED);
- cacheCfg.setAtomicityMode(ATOMIC);
- cacheCfg.setBackups(1);
- cacheCfg.setMemoryMode(CacheMemoryMode.OFFHEAP_TIERED);
- cacheCfg.setIndexedTypes(
- Integer.class, Person.class
- );
-
- cfg.setCacheConfiguration(cacheCfg);
-
- return cfg;
- }
-
- /** {@inheritDoc} */
- @Override protected void beforeTestsStarted() throws Exception {
- startGridsMultiThreaded(3, false);
-
- cache = grid(0).cache(null);
- }
-
- /** {@inheritDoc} */
- @Override protected void afterTestsStopped() throws Exception {
- stopAllGrids();
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testQueryPut() throws Exception {
- final AtomicBoolean end = new AtomicBoolean();
-
- IgniteInternalFuture<?> fut = multithreadedAsync(new Callable<Void>() {
- @Override public Void call() throws Exception {
- ThreadLocalRandom rnd = ThreadLocalRandom.current();
-
- while(!end.get()) {
- if (rnd.nextInt(5) == 0) {
- double salary = rnd.nextDouble() * RANGE * 1000;
-
- double maxSalary = salary + 1000;
-
- Collection<Cache.Entry<Integer, Object>> entries = executeQuery(salary, maxSalary);
-
- for (Cache.Entry<Integer, Object> entry : entries) {
- Person p = (Person)entry.getValue();
-
- if (p.getSalary() < salary || p.getSalary() > maxSalary)
- throw new Exception("Invalid person retrieved [min=" + salary + ", max=" + maxSalary +
- ", person=" + p + ']');
- }
- }
- else {
- int i = rnd.nextInt(RANGE);
-
- cache.put(i, new Person(i, "firstName" + i, "lastName" + i, i * 1000));
- }
- }
-
- return null;
- }
- }, 64);
-
- Thread.sleep(30 * 1000);
-
- end.set(true);
-
- fut.get();
- }
-
-
-
- /**
- * @param minSalary Min salary.
- * @param maxSalary Max salary.
- * @return Query result.
- * @throws Exception If failed.
- */
- private Collection<Cache.Entry<Integer, Object>> executeQuery(double minSalary, double maxSalary) throws Exception {
- SqlQuery qry = new SqlQuery(Person.class, "salary >= ? and salary <= ?");
-
- qry.setArgs(minSalary, maxSalary);
-
- return cache.query(qry).getAll();
- }
-
- /**
- * Person record used for query test.
- */
- public static class Person implements Serializable {
- /** Person ID. */
- @QuerySqlField(index = true)
- private int id;
-
- /** Organization ID. */
- @QuerySqlField(index = true)
- private int orgId;
-
- /** First name (not-indexed). */
- @QuerySqlField
- private String firstName;
-
- /** Last name (not indexed). */
- @QuerySqlField
- private String lastName;
-
- /** Salary. */
- @QuerySqlField(index = true)
- private double salary;
-
- /**
- * Constructs empty person.
- */
- public Person() {
- // No-op.
- }
-
- /**
- * Constructs person record that is not linked to any organization.
- *
- * @param id Person ID.
- * @param firstName First name.
- * @param lastName Last name.
- * @param salary Salary.
- */
- public Person(int id, String firstName, String lastName, double salary) {
- this(id, 0, firstName, lastName, salary);
- }
-
- /**
- * Constructs person record.
- *
- * @param id Person ID.
- * @param orgId Organization ID.
- * @param firstName First name.
- * @param lastName Last name.
- * @param salary Salary.
- */
- public Person(int id, int orgId, String firstName, String lastName, double salary) {
- this.id = id;
- this.orgId = orgId;
- this.firstName = firstName;
- this.lastName = lastName;
- this.salary = salary;
- }
-
- /**
- * @return Person id.
- */
- public int getId() {
- return id;
- }
-
- /**
- * @param id Person id.
- */
- public void setId(int id) {
- this.id = id;
- }
-
- /**
- * @return Organization id.
- */
- public int getOrganizationId() {
- return orgId;
- }
-
- /**
- * @param orgId Organization id.
- */
- public void setOrganizationId(int orgId) {
- this.orgId = orgId;
- }
-
- /**
- * @return Person first name.
- */
- public String getFirstName() {
- return firstName;
- }
-
- /**
- * @param firstName Person first name.
- */
- public void setFirstName(String firstName) {
- this.firstName = firstName;
- }
-
- /**
- * @return Person last name.
- */
- public String getLastName() {
- return lastName;
- }
-
- /**
- * @param lastName Person last name.
- */
- public void setLastName(String lastName) {
- this.lastName = lastName;
- }
-
- /**
- * @return Salary.
- */
- public double getSalary() {
- return salary;
- }
-
- /**
- * @param salary Salary.
- */
- public void setSalary(double salary) {
- this.salary = salary;
- }
-
- /** {@inheritDoc} */
- @Override public boolean equals(Object o) {
- return this == o || (o instanceof Person) && id == ((Person)o).id;
- }
-
- /** {@inheritDoc} */
- @Override public int hashCode() {
- return id;
- }
-
- /** {@inheritDoc} */
- @Override public String toString() {
- return "Person [firstName=" + firstName +
- ", id=" + id +
- ", orgId=" + orgId +
- ", lastName=" + lastName +
- ", salary=" + salary +
- ']';
- }
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueriesLoadTest1.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueriesLoadTest1.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueriesLoadTest1.java
index dcc5647..7787ce2 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueriesLoadTest1.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueriesLoadTest1.java
@@ -57,7 +57,6 @@ import org.apache.ignite.testframework.GridTestUtils;
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_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;
@@ -160,7 +159,6 @@ public class IgniteCacheQueriesLoadTest1 extends GridCommonAbstractTest {
parentCfg.setAffinity(aff);
parentCfg.setAtomicityMode(TRANSACTIONAL);
parentCfg.setCacheMode(PARTITIONED);
- parentCfg.setMemoryMode(OFFHEAP_TIERED);
parentCfg.setBackups(2);
parentCfg.setWriteSynchronizationMode(FULL_SYNC);
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryMultiThreadedOffHeapTieredSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryMultiThreadedOffHeapTieredSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryMultiThreadedOffHeapTieredSelfTest.java
deleted file mode 100644
index 630dfd9..0000000
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryMultiThreadedOffHeapTieredSelfTest.java
+++ /dev/null
@@ -1,38 +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 org.apache.ignite.cache.CacheMemoryMode;
-import org.apache.ignite.cache.CacheMode;
-import org.apache.ignite.configuration.CacheConfiguration;
-
-/**
- * Test queries in off-heap tiered mode.
- */
-public class IgniteCacheQueryMultiThreadedOffHeapTieredSelfTest extends IgniteCacheQueryMultiThreadedSelfTest {
- /** {@inheritDoc} */
- @Override protected CacheConfiguration cacheConfiguration() {
- CacheConfiguration ccfg = super.cacheConfiguration();
-
- ccfg.setCacheMode(CacheMode.REPLICATED);
- ccfg.setMemoryMode(CacheMemoryMode.OFFHEAP_TIERED);
- ccfg.setOffHeapMaxMemory(0);
-
- return ccfg;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryMultiThreadedSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryMultiThreadedSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryMultiThreadedSelfTest.java
index 54ef4fe..1f2ec99 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryMultiThreadedSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryMultiThreadedSelfTest.java
@@ -31,7 +31,6 @@ import javax.cache.Cache;
import org.apache.ignite.Ignite;
import org.apache.ignite.IgniteCache;
import org.apache.ignite.IgniteCheckedException;
-import org.apache.ignite.cache.CacheMemoryMode;
import org.apache.ignite.cache.CachePeekMode;
import org.apache.ignite.cache.eviction.lru.LruEvictionPolicy;
import org.apache.ignite.cache.query.ScanQuery;
@@ -121,11 +120,7 @@ public class IgniteCacheQueryMultiThreadedSelfTest extends GridCommonAbstractTes
}
cacheCfg.setEvictionPolicy(plc);
-
- cacheCfg.setSqlOnheapRowCacheSize(128);
-
- if (offheapEnabled())
- cacheCfg.setOffHeapMaxMemory(evictsEnabled() ? 1000 : 0); // Small offheap for evictions.
+ cacheCfg.setOnheapCacheEnabled(plc != null);
return cacheCfg;
}
@@ -163,11 +158,6 @@ public class IgniteCacheQueryMultiThreadedSelfTest extends GridCommonAbstractTes
}
}
- /** @return {@code true} If offheap enabled. */
- protected boolean offheapEnabled() {
- return false;
- }
-
/** @return {@code true} If evictions enabled. */
protected boolean evictsEnabled() {
return false;
@@ -273,9 +263,6 @@ public class IgniteCacheQueryMultiThreadedSelfTest extends GridCommonAbstractTes
// Put test values into cache.
final IgniteCache<Integer, String> c = cache(Integer.class, String.class);
- if (c.getConfiguration(CacheConfiguration.class).getMemoryMode() == CacheMemoryMode.OFFHEAP_TIERED)
- return;
-
assertEquals(0, g.cache(null).localSize());
assertEquals(0, c.query(new SqlQuery(String.class, "1 = 1")).getAll().size());
@@ -346,9 +333,6 @@ public class IgniteCacheQueryMultiThreadedSelfTest extends GridCommonAbstractTes
// Put test values into cache.
final IgniteCache<Integer, Long> c = cache(Integer.class, Long.class);
- if (c.getConfiguration(CacheConfiguration.class).getMemoryMode() == CacheMemoryMode.OFFHEAP_TIERED)
- return;
-
assertEquals(0, g.cache(null).localSize());
assertEquals(0, c.query(new SqlQuery(Long.class, "1 = 1")).getAll().size());
@@ -422,9 +406,6 @@ public class IgniteCacheQueryMultiThreadedSelfTest extends GridCommonAbstractTes
// Put test values into cache.
final IgniteCache<Integer, Object> c = cache(Integer.class, Object.class);
- if (c.getConfiguration(CacheConfiguration.class).getMemoryMode() == CacheMemoryMode.OFFHEAP_TIERED)
- return;
-
assertEquals(0, g.cache(null).size());
assertEquals(0, c.query(new SqlQuery(Object.class, "1 = 1")).getAll().size());
@@ -496,9 +477,6 @@ public class IgniteCacheQueryMultiThreadedSelfTest extends GridCommonAbstractTes
// Put test values into cache.
final IgniteCache<Integer, TestValue> c = cache(Integer.class, TestValue.class);
- if (c.getConfiguration(CacheConfiguration.class).getMemoryMode() == CacheMemoryMode.OFFHEAP_TIERED)
- return;
-
assertEquals(0, g.cache(null).localSize());
assertEquals(0, c.query(new SqlQuery(TestValue.class, "1 = 1")).getAll().size());
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryOffheapEvictsMultiThreadedSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryOffheapEvictsMultiThreadedSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryOffheapEvictsMultiThreadedSelfTest.java
deleted file mode 100644
index d7d2b5a..0000000
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryOffheapEvictsMultiThreadedSelfTest.java
+++ /dev/null
@@ -1,28 +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;
-
-/**
- * Multi-threaded tests for cache queries.
- */
-public class IgniteCacheQueryOffheapEvictsMultiThreadedSelfTest extends IgniteCacheQueryOffheapMultiThreadedSelfTest {
- /** {@inheritDoc} */
- @Override protected boolean evictsEnabled() {
- return true;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryOffheapMultiThreadedSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryOffheapMultiThreadedSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryOffheapMultiThreadedSelfTest.java
deleted file mode 100644
index db132b8..0000000
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryOffheapMultiThreadedSelfTest.java
+++ /dev/null
@@ -1,28 +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;
-
-/**
- * Queries over off-heap indexes.
- */
-public class IgniteCacheQueryOffheapMultiThreadedSelfTest extends IgniteCacheQueryMultiThreadedSelfTest {
- /** {@inheritDoc} */
- @Override protected boolean offheapEnabled() {
- return true;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCrossCachesJoinsQueryTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCrossCachesJoinsQueryTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCrossCachesJoinsQueryTest.java
index 6dd0d93..cd35788 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCrossCachesJoinsQueryTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCrossCachesJoinsQueryTest.java
@@ -35,7 +35,6 @@ import java.util.concurrent.Callable;
import javax.cache.CacheException;
import org.apache.ignite.Ignite;
import org.apache.ignite.IgniteCache;
-import org.apache.ignite.cache.CacheMemoryMode;
import org.apache.ignite.cache.CacheMode;
import org.apache.ignite.cache.QueryEntity;
import org.apache.ignite.cache.QueryIndex;
@@ -56,8 +55,6 @@ 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 static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
-import static org.apache.ignite.cache.CacheMemoryMode.ONHEAP_TIERED;
import static org.apache.ignite.cache.CacheMode.PARTITIONED;
import static org.apache.ignite.cache.CacheMode.REPLICATED;
import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
@@ -100,9 +97,6 @@ public class IgniteCrossCachesJoinsQueryTest extends AbstractH2CompareQueryTest
/** */
private static Random rnd;
- /** */
- private CacheMemoryMode memMode = ONHEAP_TIERED;
-
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
@@ -335,15 +329,6 @@ public class IgniteCrossCachesJoinsQueryTest extends AbstractH2CompareQueryTest
/**
* @throws Exception If failed.
*/
- public void testDistributedJoins1Offheap() throws Exception {
- memMode = OFFHEAP_TIERED;
-
- testDistributedJoins1();
- }
-
- /**
- * @throws Exception If failed.
- */
public void testDistributedJoins2() throws Exception {
distributedJoins = true;
@@ -737,7 +722,6 @@ public class IgniteCrossCachesJoinsQueryTest extends AbstractH2CompareQueryTest
CacheConfiguration ccfg = new CacheConfiguration();
ccfg.setName(cacheName);
- ccfg.setMemoryMode(memMode);
ccfg.setCacheMode(cacheMode);
if (cacheMode == PARTITIONED)
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheQueryNodeRestartDistributedJoinSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheQueryNodeRestartDistributedJoinSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheQueryNodeRestartDistributedJoinSelfTest.java
index d022b0f..8367b2c 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheQueryNodeRestartDistributedJoinSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheQueryNodeRestartDistributedJoinSelfTest.java
@@ -175,7 +175,8 @@ public class IgniteCacheQueryNodeRestartDistributedJoinSelfTest extends IgniteCa
if (c % logFreq == 0)
info("Executed queries: " + c);
}
- }catch (Throwable e){
+ }
+ catch (Throwable e){
e.printStackTrace();
error("Got exception: " + e.getMessage());
@@ -193,40 +194,47 @@ public class IgniteCacheQueryNodeRestartDistributedJoinSelfTest extends IgniteCa
IgniteInternalFuture<?> fut2 = multithreadedAsync(new Callable<Object>() {
@SuppressWarnings({"BusyWait"})
@Override public Object call() throws Exception {
- GridRandom rnd = new GridRandom();
+ try {
+ GridRandom rnd = new GridRandom();
- while (!restartsDone.get()) {
- int g;
+ while (!restartsDone.get()) {
+ int g;
- do {
- g = rnd.nextInt(locks.length());
+ do {
+ g = rnd.nextInt(locks.length());
- if (fail.get())
- return null;
- }
- while (!locks.compareAndSet(g, 0, -1));
+ if (fail.get())
+ return null;
+ }
+ while (!locks.compareAndSet(g, 0, -1));
- log.info("Stop node: " + g);
+ log.info("Stop node: " + g);
- stopGrid(g);
+ stopGrid(g);
- Thread.sleep(rnd.nextInt(nodeLifeTime));
+ Thread.sleep(rnd.nextInt(nodeLifeTime));
- log.info("Start node: " + g);
+ log.info("Start node: " + g);
- startGrid(g);
+ startGrid(g);
- Thread.sleep(rnd.nextInt(nodeLifeTime));
+ Thread.sleep(rnd.nextInt(nodeLifeTime));
- locks.set(g, 0);
+ locks.set(g, 0);
- int c = restartCnt.incrementAndGet();
+ int c = restartCnt.incrementAndGet();
- if (c % logFreq == 0)
- info("Node restarts: " + c);
+ if (c % logFreq == 0)
+ info("Node restarts: " + c);
+ }
+
+ return true;
}
+ catch (Throwable e) {
+ e.printStackTrace();
- return true;
+ return true;
+ }
}
}, restartThreadsNum, "restart-thread");
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlAbstractSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlAbstractSelfTest.java
index 484c99b..02b6b3b 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlAbstractSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlAbstractSelfTest.java
@@ -31,7 +31,6 @@ import javax.cache.integration.CompletionListenerFuture;
import org.apache.ignite.IgniteCache;
import org.apache.ignite.IgniteDataStreamer;
import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMemoryMode;
import org.apache.ignite.cache.CacheMode;
import org.apache.ignite.cache.eviction.lru.LruEvictionPolicy;
import org.apache.ignite.cache.query.SqlQuery;
@@ -78,13 +77,12 @@ public abstract class CacheTtlAbstractSelfTest extends GridCommonAbstractTest {
ccfg.setCacheMode(cacheMode());
ccfg.setAtomicityMode(atomicityMode());
- ccfg.setMemoryMode(memoryMode());
- ccfg.setOffHeapMaxMemory(0);
LruEvictionPolicy plc = new LruEvictionPolicy();
plc.setMaxSize(MAX_CACHE_SIZE);
ccfg.setEvictionPolicy(plc);
+ ccfg.setOnheapCacheEnabled(true);
ccfg.setIndexedTypes(Integer.class, Integer.class);
ccfg.setBackups(2);
ccfg.setWriteSynchronizationMode(FULL_SYNC);
@@ -125,11 +123,6 @@ public abstract class CacheTtlAbstractSelfTest extends GridCommonAbstractTest {
protected abstract CacheAtomicityMode atomicityMode();
/**
- * @return Memory mode.
- */
- protected abstract CacheMemoryMode memoryMode();
-
- /**
* @return Cache mode.
*/
protected abstract CacheMode cacheMode();
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlAtomicAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlAtomicAbstractSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlAtomicAbstractSelfTest.java
new file mode 100644
index 0000000..51054c4
--- /dev/null
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlAtomicAbstractSelfTest.java
@@ -0,0 +1,29 @@
+/*
+ * 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.ttl;
+
+import org.apache.ignite.cache.CacheAtomicityMode;
+
+/**
+ * TTL test with offheap.
+ */
+public abstract class CacheTtlAtomicAbstractSelfTest extends CacheTtlAbstractSelfTest {
+ /** {@inheritDoc} */
+ @Override protected CacheAtomicityMode atomicityMode() {
+ return CacheAtomicityMode.ATOMIC;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlAtomicLocalSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlAtomicLocalSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlAtomicLocalSelfTest.java
new file mode 100644
index 0000000..3644636
--- /dev/null
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlAtomicLocalSelfTest.java
@@ -0,0 +1,34 @@
+/*
+ * 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.ttl;
+
+import org.apache.ignite.cache.CacheMode;
+
+/**
+ * TTL test with offheap.
+ */
+public class CacheTtlAtomicLocalSelfTest extends CacheTtlAtomicAbstractSelfTest {
+ /** {@inheritDoc} */
+ @Override protected CacheMode cacheMode() {
+ return CacheMode.LOCAL;
+ }
+
+ /** {@inheritDoc} */
+ @Override protected int gridCount() {
+ return 1;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlAtomicPartitionedSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlAtomicPartitionedSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlAtomicPartitionedSelfTest.java
new file mode 100644
index 0000000..5c1a484
--- /dev/null
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlAtomicPartitionedSelfTest.java
@@ -0,0 +1,34 @@
+/*
+ * 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.ttl;
+
+import org.apache.ignite.cache.*;
+
+/**
+ * TTL test with offheap.
+ */
+public class CacheTtlAtomicPartitionedSelfTest extends CacheTtlAtomicAbstractSelfTest {
+ /** {@inheritDoc} */
+ @Override protected CacheMode cacheMode() {
+ return CacheMode.PARTITIONED;
+ }
+
+ /** {@inheritDoc} */
+ @Override protected int gridCount() {
+ return 2;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOffheapAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOffheapAbstractSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOffheapAbstractSelfTest.java
deleted file mode 100644
index 59ed837..0000000
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOffheapAbstractSelfTest.java
+++ /dev/null
@@ -1,29 +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.ttl;
-
-import org.apache.ignite.cache.*;
-
-/**
- * TTL test with offheap.
- */
-public abstract class CacheTtlOffheapAbstractSelfTest extends CacheTtlAbstractSelfTest {
- /** {@inheritDoc} */
- @Override protected CacheMemoryMode memoryMode() {
- return CacheMemoryMode.OFFHEAP_TIERED;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOffheapAtomicAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOffheapAtomicAbstractSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOffheapAtomicAbstractSelfTest.java
deleted file mode 100644
index 6afb4d0..0000000
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOffheapAtomicAbstractSelfTest.java
+++ /dev/null
@@ -1,29 +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.ttl;
-
-import org.apache.ignite.cache.CacheAtomicityMode;
-
-/**
- * TTL test with offheap.
- */
-public abstract class CacheTtlOffheapAtomicAbstractSelfTest extends CacheTtlOffheapAbstractSelfTest {
- /** {@inheritDoc} */
- @Override protected CacheAtomicityMode atomicityMode() {
- return CacheAtomicityMode.ATOMIC;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOffheapAtomicLocalSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOffheapAtomicLocalSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOffheapAtomicLocalSelfTest.java
deleted file mode 100644
index da6631a..0000000
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOffheapAtomicLocalSelfTest.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.ignite.internal.processors.cache.ttl;
-
-import org.apache.ignite.cache.CacheMode;
-
-/**
- * TTL test with offheap.
- */
-public class CacheTtlOffheapAtomicLocalSelfTest extends CacheTtlOffheapAtomicAbstractSelfTest {
- /** {@inheritDoc} */
- @Override protected CacheMode cacheMode() {
- return CacheMode.LOCAL;
- }
-
- /** {@inheritDoc} */
- @Override protected int gridCount() {
- return 1;
- }
-}
\ No newline at end of file
[09/17] ignite git commit: IGNITE-4535 - Add option to store
deserialized values on-heap
Posted by ag...@apache.org.
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheMultiTxLockSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheMultiTxLockSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheMultiTxLockSelfTest.java
index b48f6f9..1b9b0d0 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheMultiTxLockSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheMultiTxLockSelfTest.java
@@ -86,6 +86,7 @@ public class IgniteCacheMultiTxLockSelfTest extends GridCommonAbstractTest {
plc.setMaxSize(100000);
ccfg.setEvictionPolicy(plc);
+ ccfg.setOnheapCacheEnabled(true);
c.setCacheConfiguration(ccfg);
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePutRetryAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePutRetryAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePutRetryAbstractSelfTest.java
index 1ee0503..ee83990 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePutRetryAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePutRetryAbstractSelfTest.java
@@ -37,6 +37,7 @@ import org.apache.ignite.cache.CacheAtomicWriteOrderMode;
import org.apache.ignite.cache.CacheAtomicityMode;
import org.apache.ignite.cache.CacheEntryProcessor;
import org.apache.ignite.cache.CachePartialUpdateException;
+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.AtomicConfiguration;
@@ -61,7 +62,6 @@ import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
import static org.apache.ignite.cache.CacheRebalanceMode.SYNC;
import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
import static org.apache.ignite.internal.processors.cache.transactions.IgniteTxManager.DEFERRED_ONE_PHASE_COMMIT_ACK_REQUEST_TIMEOUT;
-import static org.apache.ignite.testframework.GridTestUtils.TestMemoryMode;
import static org.apache.ignite.testframework.GridTestUtils.runAsync;
/**
@@ -85,13 +85,13 @@ public abstract class IgniteCachePutRetryAbstractSelfTest extends GridCommonAbst
}
/**
- * @param memMode Memory mode.
+ * @param evict If {@code true} adds eviction policy.
* @param store If {@code true} adds cache store.
* @return Cache configuration.
* @throws Exception If failed.
*/
@SuppressWarnings("unchecked")
- protected CacheConfiguration cacheConfiguration(TestMemoryMode memMode, boolean store) throws Exception {
+ protected CacheConfiguration cacheConfiguration(boolean evict, boolean store) throws Exception {
CacheConfiguration cfg = new CacheConfiguration();
cfg.setAtomicityMode(atomicityMode());
@@ -100,13 +100,21 @@ public abstract class IgniteCachePutRetryAbstractSelfTest extends GridCommonAbst
cfg.setBackups(1);
cfg.setRebalanceMode(SYNC);
+ if (evict) {
+ LruEvictionPolicy plc = new LruEvictionPolicy();
+
+ plc.setMaxSize(100);
+
+ cfg.setEvictionPolicy(plc);
+
+ cfg.setOnheapCacheEnabled(true);
+ }
+
if (store) {
cfg.setCacheStoreFactory(new TestStoreFactory());
cfg.setWriteThrough(true);
}
- GridTestUtils.setMemoryMode(null, cfg, memMode, 100, 1024);
-
return cfg;
}
@@ -173,80 +181,73 @@ public abstract class IgniteCachePutRetryAbstractSelfTest extends GridCommonAbst
* @throws Exception If failed.
*/
public void testPut() throws Exception {
- checkRetry(Test.PUT, TestMemoryMode.HEAP, false);
+ checkRetry(Test.PUT, false, false);
}
/**
* @throws Exception If failed.
*/
public void testGetAndPut() throws Exception {
- checkRetry(Test.GET_AND_PUT, TestMemoryMode.HEAP, false);
+ checkRetry(Test.GET_AND_PUT, false, false);
}
/**
* @throws Exception If failed.
*/
public void testPutStoreEnabled() throws Exception {
- checkRetry(Test.PUT, TestMemoryMode.HEAP, true);
+ checkRetry(Test.PUT, false, true);
}
/**
* @throws Exception If failed.
*/
public void testPutAll() throws Exception {
- checkRetry(Test.PUT_ALL, TestMemoryMode.HEAP, false);
+ checkRetry(Test.PUT_ALL, false, false);
}
/**
* @throws Exception If failed.
*/
public void testPutAsync() throws Exception {
- checkRetry(Test.PUT_ASYNC, TestMemoryMode.HEAP, false);
+ checkRetry(Test.PUT_ASYNC, false, false);
}
/**
* @throws Exception If failed.
*/
public void testPutAsyncStoreEnabled() throws Exception {
- checkRetry(Test.PUT_ASYNC, TestMemoryMode.HEAP, true);
+ checkRetry(Test.PUT_ASYNC, false, true);
}
/**
* @throws Exception If failed.
*/
public void testInvoke() throws Exception {
- checkRetry(Test.INVOKE, TestMemoryMode.HEAP, false);
+ checkRetry(Test.INVOKE, false, false);
}
/**
* @throws Exception If failed.
*/
public void testInvokeAll() throws Exception {
- checkRetry(Test.INVOKE_ALL, TestMemoryMode.HEAP, false);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testInvokeAllOffheapSwap() throws Exception {
- checkRetry(Test.INVOKE_ALL, TestMemoryMode.OFFHEAP_EVICT_SWAP, false);
+ checkRetry(Test.INVOKE_ALL, false, false);
}
/**
* @throws Exception If failed.
*/
- public void testInvokeAllOffheapTiered() throws Exception {
- checkRetry(Test.INVOKE_ALL, TestMemoryMode.OFFHEAP_TIERED, false);
+ public void testInvokeAllEvict() throws Exception {
+ checkRetry(Test.INVOKE_ALL, true, false);
}
/**
* @param test Test type.
- * @param memMode Memory mode.
+ * @param evict If {@code true} uses eviction policy
* @param store If {@code true} uses cache with store.
* @throws Exception If failed.
*/
- protected final void checkRetry(Test test, TestMemoryMode memMode, boolean store) throws Exception {
- ignite(0).createCache(cacheConfiguration(memMode, store));
+ protected final void checkRetry(Test test, boolean evict, boolean store) throws Exception {
+ ignite(0).createCache(cacheConfiguration(evict, store));
final AtomicBoolean finished = new AtomicBoolean();
@@ -520,7 +521,7 @@ public abstract class IgniteCachePutRetryAbstractSelfTest extends GridCommonAbst
* @throws Exception If failed.
*/
private void checkFailsWithNoRetries(boolean async) throws Exception {
- ignite(0).createCache(cacheConfiguration(TestMemoryMode.HEAP, false));
+ ignite(0).createCache(cacheConfiguration(false, false));
final AtomicBoolean finished = new AtomicBoolean();
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePutRetryAtomicSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePutRetryAtomicSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePutRetryAtomicSelfTest.java
index 3d7c7d7..8f5b88d 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePutRetryAtomicSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePutRetryAtomicSelfTest.java
@@ -47,7 +47,7 @@ public class IgniteCachePutRetryAtomicSelfTest extends IgniteCachePutRetryAbstra
* @throws Exception If failed.
*/
public void testPutInsideTransaction() throws Exception {
- ignite(0).createCache(cacheConfiguration(GridTestUtils.TestMemoryMode.HEAP, false));
+ ignite(0).createCache(cacheConfiguration(false, false));
CacheConfiguration<Integer, Integer> ccfg = new CacheConfiguration<>();
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePutRetryTransactionalSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePutRetryTransactionalSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePutRetryTransactionalSelfTest.java
index 7460828..b439bcc 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePutRetryTransactionalSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePutRetryTransactionalSelfTest.java
@@ -36,7 +36,6 @@ import org.apache.ignite.internal.IgniteInternalFuture;
import org.apache.ignite.internal.util.typedef.internal.U;
import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-import static org.apache.ignite.testframework.GridTestUtils.TestMemoryMode;
import static org.apache.ignite.testframework.GridTestUtils.runAsync;
import static org.apache.ignite.testframework.GridTestUtils.runMultiThreadedAsync;
@@ -93,52 +92,45 @@ public class IgniteCachePutRetryTransactionalSelfTest extends IgniteCachePutRetr
* @throws Exception If failed.
*/
public void testExplicitTransactionRetriesSingleValue() throws Exception {
- checkRetry(Test.TX_PUT, TestMemoryMode.HEAP, false);
+ checkRetry(Test.TX_PUT, false, false);
}
/**
* @throws Exception If failed.
*/
public void testExplicitTransactionRetriesSingleValueStoreEnabled() throws Exception {
- checkRetry(Test.TX_PUT, TestMemoryMode.HEAP, true);
+ checkRetry(Test.TX_PUT, false, true);
}
/**
* @throws Exception If failed.
*/
public void testExplicitTransactionRetries() throws Exception {
- explicitTransactionRetries(TestMemoryMode.HEAP, false);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testExplicitTransactionRetriesSingleOperation() throws Exception {
- explicitTransactionRetries(TestMemoryMode.HEAP, false);
+ explicitTransactionRetries(false, false);
}
/**
* @throws Exception If failed.
*/
public void testExplicitTransactionRetriesStoreEnabled() throws Exception {
- explicitTransactionRetries(TestMemoryMode.HEAP, true);
+ explicitTransactionRetries(false, true);
}
/**
* @throws Exception If failed.
*/
- public void testExplicitTransactionRetriesOffheapSwap() throws Exception {
- explicitTransactionRetries(TestMemoryMode.OFFHEAP_EVICT_SWAP, false);
+ public void testExplicitTransactionRetriesEvictionEnabled() throws Exception {
+ explicitTransactionRetries(true, false);
}
/**
- * @param memMode Memory mode.
+ * @param evict If {@code true} uses cache with eviction policy.
* @param store If {@code true} uses cache with store.
* @throws Exception If failed.
*/
@SuppressWarnings("unchecked")
- public void explicitTransactionRetries(TestMemoryMode memMode, boolean store) throws Exception {
- ignite(0).createCache(cacheConfiguration(memMode, store));
+ public void explicitTransactionRetries(boolean evict, boolean store) throws Exception {
+ ignite(0).createCache(cacheConfiguration(evict, store));
final AtomicInteger idx = new AtomicInteger();
int threads = 8;
@@ -211,7 +203,7 @@ public class IgniteCachePutRetryTransactionalSelfTest extends IgniteCachePutRetr
* @throws Exception If failed.
*/
public void testOriginatingNodeFailureForcesOnePhaseCommitDataCleanup() throws Exception {
- ignite(0).createCache(cacheConfiguration(TestMemoryMode.HEAP, false));
+ ignite(0).createCache(cacheConfiguration(false, false));
final AtomicBoolean finished = new AtomicBoolean();
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridCacheAtomicInvalidPartitionHandlingSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridCacheAtomicInvalidPartitionHandlingSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridCacheAtomicInvalidPartitionHandlingSelfTest.java
index 1514673..4d345c8 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridCacheAtomicInvalidPartitionHandlingSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridCacheAtomicInvalidPartitionHandlingSelfTest.java
@@ -66,7 +66,6 @@ import static org.apache.ignite.cache.CacheRebalanceMode.SYNC;
import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_ASYNC;
import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
import static org.apache.ignite.cache.CacheWriteSynchronizationMode.PRIMARY_SYNC;
-import static org.apache.ignite.testframework.GridTestUtils.TestMemoryMode;
/**
* Test GridDhtInvalidPartitionException handling in ATOMIC cache during restarts.
@@ -85,9 +84,6 @@ public class GridCacheAtomicInvalidPartitionHandlingSelfTest extends GridCommonA
/** Write sync. */
private CacheWriteSynchronizationMode writeSync;
- /** Memory mode. */
- private TestMemoryMode memMode;
-
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
@@ -107,8 +103,6 @@ public class GridCacheAtomicInvalidPartitionHandlingSelfTest extends GridCommonA
if (testClientNode() && getTestIgniteInstanceName(0).equals(igniteInstanceName))
cfg.setClientMode(true);
- GridTestUtils.setMemoryMode(cfg, ccfg, memMode, 100, 1024);
-
return cfg;
}
@@ -150,99 +144,54 @@ public class GridCacheAtomicInvalidPartitionHandlingSelfTest extends GridCommonA
* @throws Exception If failed.
*/
public void testClockFullSync() throws Exception {
- checkRestarts(CLOCK, FULL_SYNC, TestMemoryMode.HEAP);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testClockFullSyncSwap() throws Exception {
- checkRestarts(CLOCK, FULL_SYNC, TestMemoryMode.SWAP);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testClockFullSyncOffheapTiered() throws Exception {
- checkRestarts(CLOCK, FULL_SYNC, TestMemoryMode.OFFHEAP_TIERED);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testClockFullSyncOffheapSwap() throws Exception {
- checkRestarts(CLOCK, FULL_SYNC, TestMemoryMode.OFFHEAP_EVICT_SWAP);
+ checkRestarts(CLOCK, FULL_SYNC);
}
/**
* @throws Exception If failed.
*/
public void testClockPrimarySync() throws Exception {
- checkRestarts(CLOCK, PRIMARY_SYNC, TestMemoryMode.HEAP);
+ checkRestarts(CLOCK, PRIMARY_SYNC);
}
/**
* @throws Exception If failed.
*/
public void testClockFullAsync() throws Exception {
- checkRestarts(CLOCK, FULL_ASYNC, TestMemoryMode.HEAP);
+ checkRestarts(CLOCK, FULL_ASYNC);
}
/**
* @throws Exception If failed.
*/
public void testPrimaryFullSync() throws Exception {
- checkRestarts(PRIMARY, FULL_SYNC, TestMemoryMode.HEAP);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testPrimaryFullSyncSwap() throws Exception {
- checkRestarts(PRIMARY, FULL_SYNC, TestMemoryMode.SWAP);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testPrimaryFullSyncOffheapTiered() throws Exception {
- checkRestarts(PRIMARY, FULL_SYNC, TestMemoryMode.OFFHEAP_TIERED);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testPrimaryFullSyncOffheapSwap() throws Exception {
- checkRestarts(PRIMARY, FULL_SYNC, TestMemoryMode.OFFHEAP_EVICT_SWAP);
+ checkRestarts(PRIMARY, FULL_SYNC);
}
/**
* @throws Exception If failed.
*/
public void testPrimaryPrimarySync() throws Exception {
- checkRestarts(PRIMARY, PRIMARY_SYNC, TestMemoryMode.HEAP);
+ checkRestarts(PRIMARY, PRIMARY_SYNC);
}
/**
* @throws Exception If failed.
*/
public void testPrimaryFullAsync() throws Exception {
- checkRestarts(PRIMARY, FULL_ASYNC, TestMemoryMode.HEAP);
+ checkRestarts(PRIMARY, FULL_ASYNC);
}
/**
* @param writeOrder Write order to check.
* @param writeSync Write synchronization mode to check.
- * @param memMode Memory mode.
* @throws Exception If failed.
*/
private void checkRestarts(CacheAtomicWriteOrderMode writeOrder,
- CacheWriteSynchronizationMode writeSync,
- TestMemoryMode memMode)
+ CacheWriteSynchronizationMode writeSync)
throws Exception {
this.writeOrder = writeOrder;
this.writeSync = writeSync;
- this.memMode = memMode;
final int gridCnt = 6;
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicClientOnlyMultiNodeFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicClientOnlyMultiNodeFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicClientOnlyMultiNodeFullApiSelfTest.java
index af80bf6..0b8ccdf 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicClientOnlyMultiNodeFullApiSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicClientOnlyMultiNodeFullApiSelfTest.java
@@ -192,7 +192,7 @@ public class GridCacheAtomicClientOnlyMultiNodeFullApiSelfTest extends GridCache
}
/** {@inheritDoc} */
- @Override public void _testEvictExpired() throws Exception {
+ @Override public void testEvictExpired() throws Exception {
IgniteCache<String, Integer> cache = jcache();
final String key = primaryKeysForCache(cache, 1).get(0);
@@ -224,10 +224,6 @@ public class GridCacheAtomicClientOnlyMultiNodeFullApiSelfTest extends GridCache
assertNull(cache.localPeek(key, CachePeekMode.ONHEAP));
- cache.localPromote(Collections.singleton(key));
-
- assertNull(cache.localPeek(key, CachePeekMode.ONHEAP));
-
assertTrue(cache.localSize() == 0);
// Force reload on primary node.
@@ -292,7 +288,7 @@ public class GridCacheAtomicClientOnlyMultiNodeFullApiSelfTest extends GridCache
}
/** {@inheritDoc} */
- @Override public void _testPeekExpired() throws Exception {
+ @Override public void testPeekExpired() throws Exception {
IgniteCache<String, Integer> c = jcache();
String key = primaryKeysForCache(c, 1).get(0);
@@ -315,111 +311,6 @@ public class GridCacheAtomicClientOnlyMultiNodeFullApiSelfTest extends GridCache
assert c.localSize() == 0 : "Cache is not empty.";
}
- // TODO: GG-11148 check if test makes sense.
- /** {@inheritDoc} */
- @Override public void _testUnswap() throws Exception {
- IgniteCache<String, Integer> cache = jcache();
-
- List<String> keys = primaryKeysForCache(cache, 3);
-
- String k1 = keys.get(0);
- String k2 = keys.get(1);
- String k3 = keys.get(2);
-
- cache.put(k1, 1);
- cache.put(k2, 2);
- cache.put(k3, 3);
-
- final AtomicInteger swapEvts = new AtomicInteger(0);
- final AtomicInteger unswapEvts = new AtomicInteger(0);
-
- Collection<String> locKeys = new HashSet<>();
-
- for (int i = 0; i < gridCount(); i++) {
- grid(i).events().localListen(
- new LocalListener(swapEvts, unswapEvts), EVT_CACHE_OBJECT_SWAPPED, EVT_CACHE_OBJECT_UNSWAPPED);
- }
-
- cache.localEvict(Collections.singleton(k2));
- cache.localEvict(Collections.singleton(k3));
-
- assertNull(cache.localPeek(k1, CachePeekMode.ONHEAP, CachePeekMode.OFFHEAP));
- assertNull(cache.localPeek(k2, CachePeekMode.ONHEAP, CachePeekMode.OFFHEAP));
- assertNull(cache.localPeek(k3, CachePeekMode.ONHEAP, CachePeekMode.OFFHEAP));
-
- int cnt = 0;
-
- if (locKeys.contains(k2)) {
- cache.localPromote(Collections.singleton(k2));
-
- assertEquals((Integer)2, cache.localPeek(k2, CachePeekMode.ONHEAP));
-
- cnt++;
- }
- else {
- cache.localPromote(Collections.singleton(k2));
-
- assertNull(cache.localPeek(k2, CachePeekMode.ONHEAP));
- }
-
-
- if (locKeys.contains(k3)) {
- cache.localPromote(Collections.singleton(k3));
-
- assertEquals((Integer)3, cache.localPeek(k3, CachePeekMode.ONHEAP));
-
- cnt++;
- }
- else {
- cache.localPromote(Collections.singleton(k3));
-
- assertNull(cache.localPeek(k3, CachePeekMode.ONHEAP));
- }
-
- assertEquals(cnt, swapEvts.get());
- assertEquals(cnt, unswapEvts.get());
-
- cache.localEvict(Collections.singleton(k1));
-
- assertEquals((Integer)1, cache.get(k1));
-
- if (locKeys.contains(k1))
- cnt++;
-
- assertEquals(cnt, swapEvts.get());
- assertEquals(cnt, unswapEvts.get());
-
- cache.clear();
-
- // Check with multiple arguments.
- cache.put(k1, 1);
- cache.put(k2, 2);
- cache.put(k3, 3);
-
- swapEvts.set(0);
- unswapEvts.set(0);
-
- cache.localEvict(Collections.singleton(k2));
- cache.localEvict(Collections.singleton(k3));
-
- assertNull(cache.localPeek(k1, CachePeekMode.ONHEAP, CachePeekMode.OFFHEAP));
- assertNull(cache.localPeek(k2, CachePeekMode.ONHEAP, CachePeekMode.OFFHEAP));
- assertNull(cache.localPeek(k3, CachePeekMode.ONHEAP, CachePeekMode.OFFHEAP));
-
- cache.localPromote(ImmutableSet.of(k2, k3));
-
- cnt = 0;
-
- if (locKeys.contains(k2))
- cnt++;
-
- if (locKeys.contains(k3))
- cnt++;
-
- assertEquals(cnt, swapEvts.get());
- assertEquals(cnt, unswapEvts.get());
- }
-
/**
*
*/
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicNearOnlyMultiNodeFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicNearOnlyMultiNodeFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicNearOnlyMultiNodeFullApiSelfTest.java
index f4a9a20..2909a1d 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicNearOnlyMultiNodeFullApiSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicNearOnlyMultiNodeFullApiSelfTest.java
@@ -118,56 +118,4 @@ public class GridCacheAtomicNearOnlyMultiNodeFullApiSelfTest extends GridCacheNe
for (String key : keys)
assertEquals((Integer)i++, nearCache.localPeek(key, CachePeekMode.ONHEAP));
}
-
- /** {@inheritDoc} */
- @Override public void _testEvictExpired() throws Exception {
- if (isMultiJvm())
- fail("https://issues.apache.org/jira/browse/IGNITE-1113");
-
- IgniteCache<String, Integer> cache = jcache();
-
- final String key = primaryKeysForCache(cache, 1).get(0);
-
- cache.put(key, 1);
-
- assertEquals((Integer)1, cache.get(key));
-
- long ttl = 500;
-
- grid(0).cache(null).
- withExpiryPolicy(new TouchedExpiryPolicy(new Duration(MILLISECONDS, ttl))).put(key, 1);
-
- boolean wait = waitForCondition(new GridAbsPredicate() {
- @Override public boolean apply() {
- for (int i = 0; i < gridCount(); i++) {
- if (peek(jcache(i), key) != null)
- return false;
- }
-
- return true;
- }
- }, ttl + 1000);
-
- assertTrue("Failed to wait for entry expiration.", wait);
-
- // Expired entry should not be swapped.
- cache.localEvict(Collections.singleton(key));
-
- assertNull(cache.localPeek(key, CachePeekMode.ONHEAP));
-
- cache.localPromote(Collections.singleton(key));
-
- assertNull(cache.localPeek(key, CachePeekMode.ONHEAP));
-
- assertTrue(cache.localSize() == 0);
-
- load(cache, key, true);
-
- Affinity<String> aff = ignite(0).affinity(null);
-
- for (int i = 0; i < gridCount(); i++) {
- if (aff.isPrimaryOrBackup(grid(i).cluster().localNode(), key))
- assertEquals((Integer)1, peek(jcache(i), key));
- }
- }
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicOffHeapFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicOffHeapFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicOffHeapFullApiSelfTest.java
deleted file mode 100644
index 0c6d2b9..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicOffHeapFullApiSelfTest.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.internal.processors.cache.distributed.near;
-
-import org.apache.ignite.cache.CacheAtomicWriteOrderMode;
-import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.configuration.CacheConfiguration;
-import org.apache.ignite.configuration.NearCacheConfiguration;
-
-import static org.apache.ignite.cache.CacheAtomicWriteOrderMode.CLOCK;
-import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
-
-/**
- * Tests partitioned cache with values being stored off-heap.
- */
-public class GridCacheAtomicOffHeapFullApiSelfTest extends GridCachePartitionedOffHeapFullApiSelfTest {
- /**
- * @return Write order mode for atomic cache.
- */
- protected CacheAtomicWriteOrderMode atomicWriteOrderMode() {
- return CLOCK;
- }
-
- /** {@inheritDoc} */
- @Override protected CacheAtomicityMode atomicityMode() {
- return ATOMIC;
- }
-
- /** {@inheritDoc} */
- @Override protected NearCacheConfiguration nearConfiguration() {
- return null;
- }
-
- /** {@inheritDoc} */
- @Override protected boolean lockingEnabled() {
- return false;
- }
-
- /** {@inheritDoc} */
- @Override protected boolean txEnabled() {
- return false;
- }
-
- /** {@inheritDoc} */
- @Override protected CacheConfiguration cacheConfiguration(String igniteInstanceName) throws Exception {
- CacheConfiguration ccfg = super.cacheConfiguration(igniteInstanceName);
-
- ccfg.setAtomicWriteOrderMode(atomicWriteOrderMode());
-
- return ccfg;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicOffHeapMultiNodeFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicOffHeapMultiNodeFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicOffHeapMultiNodeFullApiSelfTest.java
deleted file mode 100644
index e45b30c..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicOffHeapMultiNodeFullApiSelfTest.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.internal.processors.cache.distributed.near;
-
-import org.apache.ignite.cache.CacheAtomicWriteOrderMode;
-import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.configuration.CacheConfiguration;
-import org.apache.ignite.configuration.NearCacheConfiguration;
-
-import static org.apache.ignite.cache.CacheAtomicWriteOrderMode.CLOCK;
-import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
-
-/**
- * Tests partitioned cache with values being stored off-heap.
- */
-public class GridCacheAtomicOffHeapMultiNodeFullApiSelfTest extends
- GridCachePartitionedOffHeapMultiNodeFullApiSelfTest {
- /**
- * @return Write order mode for atomic cache.
- */
- protected CacheAtomicWriteOrderMode atomicWriteOrderMode() {
- return CLOCK;
- }
-
- /** {@inheritDoc} */
- @Override protected CacheAtomicityMode atomicityMode() {
- return ATOMIC;
- }
-
- /** {@inheritDoc} */
- @Override protected NearCacheConfiguration nearConfiguration() {
- return null;
- }
-
- /** {@inheritDoc} */
- @Override protected boolean lockingEnabled() {
- return false;
- }
-
- /** {@inheritDoc} */
- @Override protected boolean txEnabled() {
- return false;
- }
-
- /** {@inheritDoc} */
- @Override protected CacheConfiguration cacheConfiguration(String igniteInstanceName) throws Exception {
- CacheConfiguration ccfg = super.cacheConfiguration(igniteInstanceName);
-
- ccfg.setAtomicWriteOrderMode(atomicWriteOrderMode());
-
- return ccfg;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicOffHeapTieredFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicOffHeapTieredFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicOffHeapTieredFullApiSelfTest.java
deleted file mode 100644
index b0d13e0..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicOffHeapTieredFullApiSelfTest.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.internal.processors.cache.distributed.near;
-
-import org.apache.ignite.cache.*;
-
-import static org.apache.ignite.cache.CacheMemoryMode.*;
-
-/**
- * Tests partitioned cache with off-heap tiered mode.
- */
-public class GridCacheAtomicOffHeapTieredFullApiSelfTest extends GridCacheAtomicOffHeapFullApiSelfTest {
- /** {@inheritDoc} */
- @Override protected CacheMemoryMode memoryMode() {
- return OFFHEAP_TIERED;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicOffHeapTieredMultiNodeFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicOffHeapTieredMultiNodeFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicOffHeapTieredMultiNodeFullApiSelfTest.java
deleted file mode 100644
index 472ad16..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicOffHeapTieredMultiNodeFullApiSelfTest.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.internal.processors.cache.distributed.near;
-
-import org.apache.ignite.cache.CacheMemoryMode;
-
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
-
-/**
- * Tests partitioned cache with off-heap tiered mode.
- */
-public class GridCacheAtomicOffHeapTieredMultiNodeFullApiSelfTest extends
- GridCacheAtomicOffHeapMultiNodeFullApiSelfTest {
- /** {@inheritDoc} */
- @Override protected CacheMemoryMode memoryMode() {
- return OFFHEAP_TIERED;
- }
-}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicOnheapFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicOnheapFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicOnheapFullApiSelfTest.java
new file mode 100644
index 0000000..977fea4
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicOnheapFullApiSelfTest.java
@@ -0,0 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.ignite.internal.processors.cache.distributed.near;
+
+import org.apache.ignite.internal.processors.cache.distributed.dht.GridCacheAtomicFullApiSelfTest;
+
+public class GridCacheAtomicOnheapFullApiSelfTest extends GridCacheAtomicFullApiSelfTest {
+ /** {@inheritDoc} */
+ @Override protected boolean onheapCacheEnabled() {
+ return true;
+ }
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicOnheapMultiNodeFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicOnheapMultiNodeFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicOnheapMultiNodeFullApiSelfTest.java
new file mode 100644
index 0000000..ddd8916
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicOnheapMultiNodeFullApiSelfTest.java
@@ -0,0 +1,26 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.ignite.internal.processors.cache.distributed.near;
+
+public class GridCacheAtomicOnheapMultiNodeFullApiSelfTest extends GridCacheAtomicOnheapFullApiSelfTest {
+ /** {@inheritDoc} */
+ @Override protected int gridCount() {
+ return 3;
+ }
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicPrimaryWriteOrderOffHeapFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicPrimaryWriteOrderOffHeapFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicPrimaryWriteOrderOffHeapFullApiSelfTest.java
deleted file mode 100644
index dbb461f..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicPrimaryWriteOrderOffHeapFullApiSelfTest.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.internal.processors.cache.distributed.near;
-
-import org.apache.ignite.cache.CacheAtomicWriteOrderMode;
-
-import static org.apache.ignite.cache.CacheAtomicWriteOrderMode.PRIMARY;
-
-/**
- * Tests partitioned cache with values being stored off-heap and with primary write order.
- */
-public class GridCacheAtomicPrimaryWriteOrderOffHeapFullApiSelfTest extends GridCacheAtomicOffHeapFullApiSelfTest {
- /** {@inheritDoc} */
- @Override protected CacheAtomicWriteOrderMode atomicWriteOrderMode() {
- return PRIMARY;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicPrimaryWriteOrderOffHeapTieredFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicPrimaryWriteOrderOffHeapTieredFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicPrimaryWriteOrderOffHeapTieredFullApiSelfTest.java
deleted file mode 100644
index 6df18be..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicPrimaryWriteOrderOffHeapTieredFullApiSelfTest.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.internal.processors.cache.distributed.near;
-
-import org.apache.ignite.cache.CacheMemoryMode;
-
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
-
-/**
- * Tests partitioned cache with off-heap tiered mode.
- */
-public class GridCacheAtomicPrimaryWriteOrderOffHeapTieredFullApiSelfTest extends
- GridCacheAtomicPrimaryWriteOrderOffHeapFullApiSelfTest {
- /** {@inheritDoc} */
- @Override protected CacheMemoryMode memoryMode() {
- return OFFHEAP_TIERED;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicPrimaryWriteOrderOnheapFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicPrimaryWriteOrderOnheapFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicPrimaryWriteOrderOnheapFullApiSelfTest.java
new file mode 100644
index 0000000..21ecf5e
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicPrimaryWriteOrderOnheapFullApiSelfTest.java
@@ -0,0 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.ignite.internal.processors.cache.distributed.near;
+
+import org.apache.ignite.cache.CacheAtomicWriteOrderMode;
+
+public class GridCacheAtomicPrimaryWriteOrderOnheapFullApiSelfTest extends GridCacheAtomicOnheapFullApiSelfTest {
+ /** {@inheritDoc} */
+ @Override protected CacheAtomicWriteOrderMode atomicWriteOrderMode() {
+ return CacheAtomicWriteOrderMode.PRIMARY;
+ }
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicPrimaryWriteOrderOnheapMultiNodeFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicPrimaryWriteOrderOnheapMultiNodeFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicPrimaryWriteOrderOnheapMultiNodeFullApiSelfTest.java
new file mode 100644
index 0000000..99778c7
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicPrimaryWriteOrderOnheapMultiNodeFullApiSelfTest.java
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.ignite.internal.processors.cache.distributed.near;
+
+import org.apache.ignite.cache.CacheAtomicWriteOrderMode;
+
+public class GridCacheAtomicPrimaryWriteOrderOnheapMultiNodeFullApiSelfTest
+ extends GridCacheAtomicOnheapMultiNodeFullApiSelfTest {
+ /** {@inheritDoc} */
+ @Override protected CacheAtomicWriteOrderMode atomicWriteOrderMode() {
+ return CacheAtomicWriteOrderMode.PRIMARY;
+ }
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicPrimaryWrityOrderOffHeapMultiNodeFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicPrimaryWrityOrderOffHeapMultiNodeFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicPrimaryWrityOrderOffHeapMultiNodeFullApiSelfTest.java
deleted file mode 100644
index e49c60b..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicPrimaryWrityOrderOffHeapMultiNodeFullApiSelfTest.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.internal.processors.cache.distributed.near;
-
-import org.apache.ignite.cache.CacheAtomicWriteOrderMode;
-
-import static org.apache.ignite.cache.CacheAtomicWriteOrderMode.PRIMARY;
-
-/**
- * Tests partitioned cache with values being stored off-heap and with primary write order.
- */
-public class GridCacheAtomicPrimaryWrityOrderOffHeapMultiNodeFullApiSelfTest extends
- GridCacheAtomicOffHeapMultiNodeFullApiSelfTest {
- /** {@inheritDoc} */
- @Override protected CacheAtomicWriteOrderMode atomicWriteOrderMode() {
- return PRIMARY;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicPrimaryWrityOrderOffHeapTieredMultiNodeFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicPrimaryWrityOrderOffHeapTieredMultiNodeFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicPrimaryWrityOrderOffHeapTieredMultiNodeFullApiSelfTest.java
deleted file mode 100644
index f2e3b12..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicPrimaryWrityOrderOffHeapTieredMultiNodeFullApiSelfTest.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.internal.processors.cache.distributed.near;
-
-import org.apache.ignite.cache.CacheMemoryMode;
-
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
-
-/**
- * Tests partitioned cache with off-heap tiered mode.
- */
-public class GridCacheAtomicPrimaryWrityOrderOffHeapTieredMultiNodeFullApiSelfTest extends
- GridCacheAtomicPrimaryWrityOrderOffHeapMultiNodeFullApiSelfTest {
- /** {@inheritDoc} */
- @Override protected CacheMemoryMode memoryMode() {
- return OFFHEAP_TIERED;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearReadersSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearReadersSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearReadersSelfTest.java
index faf9ba2..6f7ff65 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearReadersSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearReadersSelfTest.java
@@ -82,7 +82,6 @@ public class GridCacheNearReadersSelfTest extends GridCommonAbstractTest {
cacheCfg.setRebalanceMode(NONE);
cacheCfg.setAffinity(aff);
- cacheCfg.setEvictSynchronized(true);
cacheCfg.setAtomicityMode(atomicityMode());
cacheCfg.setBackups(aff.backups());
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedAtomicOnheapFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedAtomicOnheapFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedAtomicOnheapFullApiSelfTest.java
new file mode 100644
index 0000000..c05e6ed
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedAtomicOnheapFullApiSelfTest.java
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.ignite.internal.processors.cache.distributed.near;
+
+import org.apache.ignite.cache.CacheAtomicityMode;
+
+public class GridCachePartitionedAtomicOnheapFullApiSelfTest extends GridCachePartitionedOnheapFullApiSelfTest {
+ /** {@inheritDoc} */
+ @Override protected CacheAtomicityMode atomicityMode() {
+ return CacheAtomicityMode.ATOMIC;
+ }
+
+ /** {@inheritDoc} */
+ @Override protected boolean txEnabled() {
+ return false;
+ }
+
+ /** {@inheritDoc} */
+ @Override protected boolean lockingEnabled() {
+ return false;
+ }
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedAtomicOnheapMultiNodeFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedAtomicOnheapMultiNodeFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedAtomicOnheapMultiNodeFullApiSelfTest.java
new file mode 100644
index 0000000..703d88c
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedAtomicOnheapMultiNodeFullApiSelfTest.java
@@ -0,0 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.ignite.internal.processors.cache.distributed.near;
+
+import org.apache.ignite.cache.CacheAtomicityMode;
+
+public class GridCachePartitionedAtomicOnheapMultiNodeFullApiSelfTest extends GridCachePartitionedOnheapMultiNodeFullApiSelfTest {
+ /** {@inheritDoc} */
+ @Override protected CacheAtomicityMode atomicityMode() {
+ return CacheAtomicityMode.ATOMIC;
+ }
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedEvictionSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedEvictionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedEvictionSelfTest.java
index 67422b7..f5ec2c2 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedEvictionSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedEvictionSelfTest.java
@@ -90,6 +90,7 @@ public class GridCachePartitionedEvictionSelfTest extends GridCacheAbstractSelfT
FifoEvictionPolicy plc = new FifoEvictionPolicy();
plc.setMaxSize(EVICT_CACHE_SIZE);
cc.setEvictionPolicy(plc);
+ cc.setOnheapCacheEnabled(true);
FifoEvictionPolicy nearPlc = new FifoEvictionPolicy();
nearPlc.setMaxSize(EVICT_CACHE_SIZE);
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedFullApiSelfTest.java
index 5aad5a6..b790975 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedFullApiSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedFullApiSelfTest.java
@@ -51,8 +51,6 @@ public class GridCachePartitionedFullApiSelfTest extends GridCacheAbstractFullAp
@Override protected CacheConfiguration cacheConfiguration(String igniteInstanceName) throws Exception {
CacheConfiguration cfg = super.cacheConfiguration(igniteInstanceName);
- cfg.setEvictSynchronized(false);
-
cfg.setAtomicityMode(atomicityMode());
return cfg;
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiNodeFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiNodeFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiNodeFullApiSelfTest.java
index 965a50a..a546d89 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiNodeFullApiSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiNodeFullApiSelfTest.java
@@ -29,7 +29,6 @@ import org.apache.ignite.Ignite;
import org.apache.ignite.IgniteAtomicLong;
import org.apache.ignite.IgniteCache;
import org.apache.ignite.IgniteLogger;
-import org.apache.ignite.cache.CacheMemoryMode;
import org.apache.ignite.cache.CachePeekMode;
import org.apache.ignite.cache.affinity.Affinity;
import org.apache.ignite.cache.affinity.AffinityKeyMapped;
@@ -185,48 +184,6 @@ public class GridCachePartitionedMultiNodeFullApiSelfTest extends GridCacheParti
}
/**
- * TODO: GG-11148 check if test makes sense.
- *
- * @throws Exception If failed.
- */
- public void _testUnswapShort() throws Exception {
- if (memoryMode() == CacheMemoryMode.OFFHEAP_TIERED)
- return;
-
- final IgniteAtomicLong swapEvts = grid(0).atomicLong("swapEvts", 0, true);
-
- final IgniteAtomicLong unswapEvts = grid(0).atomicLong("unswapEvts", 0, true);
-
- for (int i = 0; i < gridCount(); i++)
- grid(i).events().localListen(
- new SwapUnswapLocalListener(), EVT_CACHE_OBJECT_SWAPPED, EVT_CACHE_OBJECT_UNSWAPPED);
-
- jcache().put("key", 1);
-
- for (int i = 0; i < gridCount(); i++) {
- if (grid(i).affinity(null).isBackup(grid(i).localNode(), "key")) {
- jcache(i).localEvict(Collections.singleton("key"));
-
- assertNull(jcache(i).localPeek("key", ONHEAP));
-
- assertEquals((Integer)1, jcache(i).get("key"));
-
- GridTestUtils.waitForCondition(new GridAbsPredicate() {
- @Override public boolean apply() {
- return swapEvts.get() == 1 && unswapEvts.get() == 1;
- }
- }, 5000);
-
- assertEquals(1, swapEvts.get());
-
- assertEquals(1, unswapEvts.get());
-
- break;
- }
- }
- }
-
- /**
* @throws Exception If failed.
*/
public void testPeekPartitionedModes() throws Exception {
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiThreadedPutGetSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiThreadedPutGetSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiThreadedPutGetSelfTest.java
index 77c4c56..86b2217 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiThreadedPutGetSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiThreadedPutGetSelfTest.java
@@ -77,8 +77,8 @@ public class GridCachePartitionedMultiThreadedPutGetSelfTest extends GridCommonA
plc.setMaxMemorySize(1000);
cc.setEvictionPolicy(plc);
+ cc.setOnheapCacheEnabled(true);
cc.setAtomicityMode(TRANSACTIONAL);
- cc.setEvictSynchronized(false);
NearCacheConfiguration nearCfg = new NearCacheConfiguration();
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedOffHeapFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedOffHeapFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedOffHeapFullApiSelfTest.java
deleted file mode 100644
index 1f6ca4e..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedOffHeapFullApiSelfTest.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.internal.processors.cache.distributed.near;
-
-import org.apache.ignite.cache.CacheMemoryMode;
-
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_VALUES;
-
-/**
- * Tests partitioned cache with values being stored off-heap.
- */
-public class GridCachePartitionedOffHeapFullApiSelfTest extends GridCachePartitionedFullApiSelfTest {
- /** {@inheritDoc} */
- @Override protected CacheMemoryMode memoryMode() {
- return OFFHEAP_VALUES;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedOffHeapMultiNodeFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedOffHeapMultiNodeFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedOffHeapMultiNodeFullApiSelfTest.java
deleted file mode 100644
index 901cf82..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedOffHeapMultiNodeFullApiSelfTest.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.internal.processors.cache.distributed.near;
-
-import org.apache.ignite.cache.CacheMemoryMode;
-
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_VALUES;
-
-/**
- * Tests partitioned cache with values being stored off-heap.
- */
-public class GridCachePartitionedOffHeapMultiNodeFullApiSelfTest extends GridCachePartitionedMultiNodeFullApiSelfTest {
- /** {@inheritDoc} */
- @Override protected CacheMemoryMode memoryMode() {
- return OFFHEAP_VALUES;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedOffHeapTieredFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedOffHeapTieredFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedOffHeapTieredFullApiSelfTest.java
deleted file mode 100644
index 365e9aa..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedOffHeapTieredFullApiSelfTest.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.internal.processors.cache.distributed.near;
-
-import org.apache.ignite.cache.*;
-
-import static org.apache.ignite.cache.CacheMemoryMode.*;
-
-/**
- * Tests partitioned cache with off-heap tiered mode.
- */
-public class GridCachePartitionedOffHeapTieredFullApiSelfTest extends GridCachePartitionedOffHeapFullApiSelfTest {
- /** {@inheritDoc} */
- @Override protected CacheMemoryMode memoryMode() {
- return OFFHEAP_TIERED;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedOffHeapTieredMultiNodeFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedOffHeapTieredMultiNodeFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedOffHeapTieredMultiNodeFullApiSelfTest.java
deleted file mode 100644
index 593271c..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedOffHeapTieredMultiNodeFullApiSelfTest.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.internal.processors.cache.distributed.near;
-
-import org.apache.ignite.IgniteCache;
-import org.apache.ignite.cache.CacheMemoryMode;
-import org.apache.ignite.cache.CachePeekMode;
-
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
-
-/**
- * Tests partitioned cache with off-heap tiered mode.
- */
-public class GridCachePartitionedOffHeapTieredMultiNodeFullApiSelfTest extends GridCachePartitionedOffHeapMultiNodeFullApiSelfTest {
- /** {@inheritDoc} */
- @Override protected CacheMemoryMode memoryMode() {
- return OFFHEAP_TIERED;
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testPut() throws Exception {
- IgniteCache<String, Integer> cache = grid(0).cache(null);
-
- assert gridCount() > 3;
- String key = null;
-
- for (int i = 0; i < 250; ++i) {
- String testKey = "key_" + i;
-
- if (!grid(0).affinity(null).isPrimaryOrBackup(grid(0).localNode(), testKey)) {
- key = testKey;
-
- break;
- }
- }
-
- assert key != null;
-
- IgniteCache<String, Integer> primaryCache = primaryCache(key);
-
- assertFalse(grid(0).affinity(null).isPrimary(grid(0).localNode(), key));
- assertFalse(grid(0).affinity(null).isBackup(grid(0).localNode(), key));
-
- primaryCache.put(key, 4); // Put from primary.
-
- assertNull(primaryCache.localPeek(key, CachePeekMode.ONHEAP));
- assertEquals(4, primaryCache.localPeek(key, CachePeekMode.OFFHEAP).intValue());
-
- cache.put(key, 5); // Put from near to add reader on primary.
-
- assertEquals(5, primaryCache.localPeek(key, CachePeekMode.ONHEAP).intValue());
- // TODO: GG-11148 check if test makes sense.
- // assertNull(primaryCache.localPeek(key, CachePeekMode.OFFHEAP));
- assertEquals(5, cache.get(key).intValue());
- assertEquals(5, storeStgy.getFromStore(key));
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedOnheapFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedOnheapFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedOnheapFullApiSelfTest.java
new file mode 100644
index 0000000..c9f29fe
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedOnheapFullApiSelfTest.java
@@ -0,0 +1,26 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.ignite.internal.processors.cache.distributed.near;
+
+public class GridCachePartitionedOnheapFullApiSelfTest extends GridCachePartitionedFullApiSelfTest {
+ /** {@inheritDoc} */
+ @Override protected boolean onheapCacheEnabled() {
+ return true;
+ }
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedOnheapMultiNodeFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedOnheapMultiNodeFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedOnheapMultiNodeFullApiSelfTest.java
new file mode 100644
index 0000000..14cc6cb
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedOnheapMultiNodeFullApiSelfTest.java
@@ -0,0 +1,26 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.ignite.internal.processors.cache.distributed.near;
+
+public class GridCachePartitionedOnheapMultiNodeFullApiSelfTest extends GridCachePartitionedMultiNodeFullApiSelfTest {
+ /** {@inheritDoc} */
+ @Override protected boolean onheapCacheEnabled() {
+ return true;
+ }
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOffheapCacheStoreUpdateTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOffheapCacheStoreUpdateTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOffheapCacheStoreUpdateTest.java
deleted file mode 100644
index ae3f695..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOffheapCacheStoreUpdateTest.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.internal.processors.cache.distributed.near;
-
-import org.apache.ignite.cache.CacheMemoryMode;
-import org.apache.ignite.configuration.CacheConfiguration;
-
-/**
- * Check that near cache is updated when entry loaded from store.
- */
-public class GridNearOffheapCacheStoreUpdateTest extends GridNearCacheStoreUpdateTest {
- /** {@inheritDoc} */
- @Override protected CacheConfiguration<String, String> cacheConfiguration() {
- final CacheConfiguration<String, String> ccfg = super.cacheConfiguration();
-
- ccfg.setMemoryMode(CacheMemoryMode.OFFHEAP_TIERED);
-
- return ccfg;
- }
-}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheAbstractReplicatedByteArrayValuesSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheAbstractReplicatedByteArrayValuesSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheAbstractReplicatedByteArrayValuesSelfTest.java
index acff6cf..b4e58fc 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheAbstractReplicatedByteArrayValuesSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheAbstractReplicatedByteArrayValuesSelfTest.java
@@ -22,8 +22,6 @@ import org.apache.ignite.configuration.IgniteConfiguration;
import org.apache.ignite.internal.processors.cache.distributed.GridCacheAbstractDistributedByteArrayValuesSelfTest;
import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_VALUES;
import static org.apache.ignite.cache.CacheMode.REPLICATED;
import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
@@ -48,33 +46,6 @@ public abstract class GridCacheAbstractReplicatedByteArrayValuesSelfTest extends
cfg.setCacheMode(REPLICATED);
cfg.setAtomicityMode(TRANSACTIONAL);
cfg.setWriteSynchronizationMode(FULL_SYNC);
- cfg.setEvictSynchronized(false);
-
- return cfg;
- }
-
- /** {@inheritDoc} */
- @Override protected CacheConfiguration offheapCacheConfiguration0() {
- CacheConfiguration cfg = new CacheConfiguration();
-
- cfg.setCacheMode(REPLICATED);
- cfg.setAtomicityMode(TRANSACTIONAL);
- cfg.setWriteSynchronizationMode(FULL_SYNC);
- cfg.setMemoryMode(OFFHEAP_VALUES);
- cfg.setOffHeapMaxMemory(100 * 1024 * 1024);
-
- return cfg;
- }
-
- /** {@inheritDoc} */
- @Override protected CacheConfiguration offheapTieredCacheConfiguration0() {
- CacheConfiguration cfg = new CacheConfiguration();
-
- cfg.setCacheMode(REPLICATED);
- cfg.setAtomicityMode(TRANSACTIONAL);
- cfg.setWriteSynchronizationMode(FULL_SYNC);
- cfg.setMemoryMode(OFFHEAP_TIERED);
- cfg.setOffHeapMaxMemory(100 * 1024 * 1024);
return cfg;
}
[11/17] ignite git commit: IGNITE-4535 - Add option to store
deserialized values on-heap
Posted by ag...@apache.org.
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueMultiNodeConsistencySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueMultiNodeConsistencySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueMultiNodeConsistencySelfTest.java
index 2d817be..a48c3e2 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueMultiNodeConsistencySelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueMultiNodeConsistencySelfTest.java
@@ -25,7 +25,6 @@ import org.apache.commons.collections.CollectionUtils;
import org.apache.ignite.Ignite;
import org.apache.ignite.IgniteQueue;
import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMemoryMode;
import org.apache.ignite.cache.CacheMode;
import org.apache.ignite.configuration.CollectionConfiguration;
import org.apache.ignite.internal.IgniteKernal;
@@ -34,7 +33,6 @@ import org.apache.ignite.lang.IgniteCallable;
import org.apache.ignite.resources.IgniteInstanceResource;
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.internal.processors.cache.datastructures.GridCacheQueueMultiNodeAbstractSelfTest.AddAllJob;
import static org.apache.ignite.internal.processors.cache.datastructures.GridCacheQueueMultiNodeAbstractSelfTest.QUEUE_CAPACITY;
@@ -74,11 +72,6 @@ public class GridCacheQueueMultiNodeConsistencySelfTest extends IgniteCollection
}
/** {@inheritDoc} */
- @Override protected CacheMemoryMode collectionMemoryMode() {
- return ONHEAP_TIERED;
- }
-
- /** {@inheritDoc} */
@Override protected CacheAtomicityMode collectionCacheAtomicityMode() {
return TRANSACTIONAL;
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteCollectionAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteCollectionAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteCollectionAbstractTest.java
index fb13139..769896f 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteCollectionAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteCollectionAbstractTest.java
@@ -19,7 +19,6 @@ package org.apache.ignite.internal.processors.cache.datastructures;
import org.apache.ignite.IgniteQueue;
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.CollectionConfiguration;
@@ -77,7 +76,6 @@ public abstract class IgniteCollectionAbstractTest extends GridCommonAbstractTes
colCfg.setCacheMode(collectionCacheMode());
colCfg.setAtomicityMode(collectionCacheAtomicityMode());
- colCfg.setMemoryMode(collectionMemoryMode());
colCfg.setOffHeapMaxMemory(collectionOffHeapMaxMemory());
if (colCfg.getCacheMode() == PARTITIONED)
@@ -97,11 +95,6 @@ public abstract class IgniteCollectionAbstractTest extends GridCommonAbstractTes
protected abstract CacheMode collectionCacheMode();
/**
- * @return Collection cache memory mode.
- */
- protected abstract CacheMemoryMode collectionMemoryMode();
-
- /**
* @return Collection cache atomicity mode.
*/
protected abstract CacheAtomicityMode collectionCacheAtomicityMode();
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteDataStructureUniqueNameTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteDataStructureUniqueNameTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteDataStructureUniqueNameTest.java
index 5a4b89c..21c7690 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteDataStructureUniqueNameTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteDataStructureUniqueNameTest.java
@@ -35,7 +35,6 @@ import org.apache.ignite.IgniteLock;
import org.apache.ignite.IgniteSemaphore;
import org.apache.ignite.IgniteSet;
import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMemoryMode;
import org.apache.ignite.cache.CacheMode;
import org.apache.ignite.configuration.AtomicConfiguration;
import org.apache.ignite.configuration.IgniteConfiguration;
@@ -44,7 +43,6 @@ import org.apache.ignite.lang.IgniteUuid;
import org.apache.ignite.testframework.GridTestUtils;
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;
/**
@@ -62,11 +60,6 @@ public class IgniteDataStructureUniqueNameTest extends IgniteCollectionAbstractT
}
/** {@inheritDoc} */
- @Override protected CacheMemoryMode collectionMemoryMode() {
- return ONHEAP_TIERED;
- }
-
- /** {@inheritDoc} */
@Override protected CacheAtomicityMode collectionCacheAtomicityMode() {
return ATOMIC;
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/GridCacheLocalAtomicOffheapSetSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/GridCacheLocalAtomicOffheapSetSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/GridCacheLocalAtomicOffheapSetSelfTest.java
deleted file mode 100644
index 45fb298..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/GridCacheLocalAtomicOffheapSetSelfTest.java
+++ /dev/null
@@ -1,32 +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.datastructures.local;
-
-import org.apache.ignite.cache.CacheMemoryMode;
-
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
-
-/**
- * Set tests.
- */
-public class GridCacheLocalAtomicOffheapSetSelfTest extends GridCacheLocalAtomicSetSelfTest {
- /** {@inheritDoc} */
- @Override protected CacheMemoryMode collectionMemoryMode() {
- return OFFHEAP_TIERED;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/GridCacheLocalAtomicQueueApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/GridCacheLocalAtomicQueueApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/GridCacheLocalAtomicQueueApiSelfTest.java
index 28e1140..38af30e 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/GridCacheLocalAtomicQueueApiSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/GridCacheLocalAtomicQueueApiSelfTest.java
@@ -18,19 +18,13 @@
package org.apache.ignite.internal.processors.cache.datastructures.local;
import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMemoryMode;
import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
-import static org.apache.ignite.cache.CacheMemoryMode.ONHEAP_TIERED;
/**
* Queue tests with local atomic cache.
*/
public class GridCacheLocalAtomicQueueApiSelfTest extends GridCacheLocalQueueApiSelfTest {
- /** {@inheritDoc} */
- @Override protected CacheMemoryMode collectionMemoryMode() {
- return ONHEAP_TIERED;
- }
/** {@inheritDoc} */
@Override protected CacheAtomicityMode collectionCacheAtomicityMode() {
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/GridCacheLocalAtomicSetSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/GridCacheLocalAtomicSetSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/GridCacheLocalAtomicSetSelfTest.java
index 49454f4..a1f045d 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/GridCacheLocalAtomicSetSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/GridCacheLocalAtomicSetSelfTest.java
@@ -18,12 +18,10 @@
package org.apache.ignite.internal.processors.cache.datastructures.local;
import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMemoryMode;
import org.apache.ignite.cache.CacheMode;
import org.apache.ignite.internal.processors.cache.datastructures.GridCacheSetAbstractSelfTest;
import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
-import static org.apache.ignite.cache.CacheMemoryMode.ONHEAP_TIERED;
import static org.apache.ignite.cache.CacheMode.LOCAL;
/**
@@ -41,11 +39,6 @@ public class GridCacheLocalAtomicSetSelfTest extends GridCacheSetAbstractSelfTes
}
/** {@inheritDoc} */
- @Override protected CacheMemoryMode collectionMemoryMode() {
- return ONHEAP_TIERED;
- }
-
- /** {@inheritDoc} */
@Override protected CacheAtomicityMode collectionCacheAtomicityMode() {
return ATOMIC;
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/GridCacheLocalOffheapQueueApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/GridCacheLocalOffheapQueueApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/GridCacheLocalOffheapQueueApiSelfTest.java
deleted file mode 100644
index efce05b..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/GridCacheLocalOffheapQueueApiSelfTest.java
+++ /dev/null
@@ -1,31 +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.datastructures.local;
-
-import org.apache.ignite.cache.CacheMemoryMode;
-
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
-
-/**
- * Queue tests with local cache.
- */
-public class GridCacheLocalOffheapQueueApiSelfTest extends GridCacheLocalQueueApiSelfTest {
- /** {@inheritDoc} */
- @Override protected CacheMemoryMode collectionMemoryMode() {
- return OFFHEAP_TIERED;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/GridCacheLocalQueueApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/GridCacheLocalQueueApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/GridCacheLocalQueueApiSelfTest.java
index 7e2ed26..780cb08 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/GridCacheLocalQueueApiSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/GridCacheLocalQueueApiSelfTest.java
@@ -18,12 +18,10 @@
package org.apache.ignite.internal.processors.cache.datastructures.local;
import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMemoryMode;
import org.apache.ignite.cache.CacheMode;
import org.apache.ignite.internal.processors.cache.datastructures.GridCacheQueueApiSelfAbstractTest;
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;
/**
@@ -36,11 +34,6 @@ public class GridCacheLocalQueueApiSelfTest extends GridCacheQueueApiSelfAbstrac
}
/** {@inheritDoc} */
- @Override protected CacheMemoryMode collectionMemoryMode() {
- return ONHEAP_TIERED;
- }
-
- /** {@inheritDoc} */
@Override protected CacheAtomicityMode collectionCacheAtomicityMode() {
return TRANSACTIONAL;
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/GridCacheLocalSetSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/GridCacheLocalSetSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/GridCacheLocalSetSelfTest.java
index 4933fd9..7c37360 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/GridCacheLocalSetSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/GridCacheLocalSetSelfTest.java
@@ -18,12 +18,10 @@
package org.apache.ignite.internal.processors.cache.datastructures.local;
import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMemoryMode;
import org.apache.ignite.cache.CacheMode;
import org.apache.ignite.internal.processors.cache.datastructures.GridCacheSetAbstractSelfTest;
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;
/**
@@ -41,11 +39,6 @@ public class GridCacheLocalSetSelfTest extends GridCacheSetAbstractSelfTest {
}
/** {@inheritDoc} */
- @Override protected CacheMemoryMode collectionMemoryMode() {
- return ONHEAP_TIERED;
- }
-
- /** {@inheritDoc} */
@Override protected CacheAtomicityMode collectionCacheAtomicityMode() {
return TRANSACTIONAL;
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicOffheapQueueApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicOffheapQueueApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicOffheapQueueApiSelfTest.java
deleted file mode 100644
index e0397f5..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicOffheapQueueApiSelfTest.java
+++ /dev/null
@@ -1,32 +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.datastructures.partitioned;
-
-import org.apache.ignite.cache.CacheMemoryMode;
-
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
-
-/**
- * Queue tests with partitioned atomic cache.
- */
-public class GridCachePartitionedAtomicOffheapQueueApiSelfTest extends GridCachePartitionedAtomicQueueApiSelfTest {
- /** {@inheritDoc} */
- @Override protected CacheMemoryMode collectionMemoryMode() {
- return OFFHEAP_TIERED;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicOffheapQueueCreateMultiNodeSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicOffheapQueueCreateMultiNodeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicOffheapQueueCreateMultiNodeSelfTest.java
deleted file mode 100644
index 49d5092..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicOffheapQueueCreateMultiNodeSelfTest.java
+++ /dev/null
@@ -1,32 +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.datastructures.partitioned;
-
-import org.apache.ignite.cache.CacheMemoryMode;
-
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
-
-/**
- *
- */
-public class GridCachePartitionedAtomicOffheapQueueCreateMultiNodeSelfTest
- extends GridCachePartitionedAtomicQueueCreateMultiNodeSelfTest {
- /** {@inheritDoc} */
- @Override protected CacheMemoryMode collectionMemoryMode() {
- return OFFHEAP_TIERED;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicOffheapQueueMultiNodeSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicOffheapQueueMultiNodeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicOffheapQueueMultiNodeSelfTest.java
deleted file mode 100644
index c8152fe..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicOffheapQueueMultiNodeSelfTest.java
+++ /dev/null
@@ -1,32 +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.datastructures.partitioned;
-
-import org.apache.ignite.cache.CacheMemoryMode;
-
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
-
-/**
- * Queue multi node test.
- */
-public class GridCachePartitionedAtomicOffheapQueueMultiNodeSelfTest extends GridCachePartitionedAtomicQueueMultiNodeSelfTest {
- /** {@inheritDoc} */
- @Override protected CacheMemoryMode collectionMemoryMode() {
- return OFFHEAP_TIERED;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicQueueApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicQueueApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicQueueApiSelfTest.java
index 4e2631b..690f6b3 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicQueueApiSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicQueueApiSelfTest.java
@@ -18,21 +18,14 @@
package org.apache.ignite.internal.processors.cache.datastructures.partitioned;
import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMemoryMode;
import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
-import static org.apache.ignite.cache.CacheMemoryMode.ONHEAP_TIERED;
/**
* Queue tests with partitioned atomic cache.
*/
public class GridCachePartitionedAtomicQueueApiSelfTest extends GridCachePartitionedQueueApiSelfTest {
/** {@inheritDoc} */
- @Override protected CacheMemoryMode collectionMemoryMode() {
- return ONHEAP_TIERED;
- }
-
- /** {@inheritDoc} */
@Override protected CacheAtomicityMode collectionCacheAtomicityMode() {
return ATOMIC;
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicQueueCreateMultiNodeSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicQueueCreateMultiNodeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicQueueCreateMultiNodeSelfTest.java
index cc24d7f..59d43a2 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicQueueCreateMultiNodeSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicQueueCreateMultiNodeSelfTest.java
@@ -18,10 +18,8 @@
package org.apache.ignite.internal.processors.cache.datastructures.partitioned;
import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMemoryMode;
import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
-import static org.apache.ignite.cache.CacheMemoryMode.ONHEAP_TIERED;
/**
*
@@ -29,11 +27,6 @@ import static org.apache.ignite.cache.CacheMemoryMode.ONHEAP_TIERED;
public class GridCachePartitionedAtomicQueueCreateMultiNodeSelfTest
extends GridCachePartitionedQueueCreateMultiNodeSelfTest {
/** {@inheritDoc} */
- @Override protected CacheMemoryMode collectionMemoryMode() {
- return ONHEAP_TIERED;
- }
-
- /** {@inheritDoc} */
@Override protected CacheAtomicityMode collectionCacheAtomicityMode() {
return ATOMIC;
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicQueueFailoverDataConsistencySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicQueueFailoverDataConsistencySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicQueueFailoverDataConsistencySelfTest.java
index 8e39faa..5a67024 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicQueueFailoverDataConsistencySelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicQueueFailoverDataConsistencySelfTest.java
@@ -18,11 +18,9 @@
package org.apache.ignite.internal.processors.cache.datastructures.partitioned;
import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMemoryMode;
import org.apache.ignite.internal.processors.cache.datastructures.GridCacheAbstractQueueFailoverDataConsistencySelfTest;
import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
-import static org.apache.ignite.cache.CacheMemoryMode.ONHEAP_TIERED;
/**
* Queue failover test for atomic cache.
@@ -30,11 +28,6 @@ import static org.apache.ignite.cache.CacheMemoryMode.ONHEAP_TIERED;
public class GridCachePartitionedAtomicQueueFailoverDataConsistencySelfTest extends
GridCacheAbstractQueueFailoverDataConsistencySelfTest {
/** {@inheritDoc} */
- @Override protected CacheMemoryMode collectionMemoryMode() {
- return ONHEAP_TIERED;
- }
-
- /** {@inheritDoc} */
@Override protected CacheAtomicityMode collectionCacheAtomicityMode() {
return ATOMIC;
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicQueueMultiNodeSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicQueueMultiNodeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicQueueMultiNodeSelfTest.java
index b783ae7..97aac60 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicQueueMultiNodeSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicQueueMultiNodeSelfTest.java
@@ -18,21 +18,14 @@
package org.apache.ignite.internal.processors.cache.datastructures.partitioned;
import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMemoryMode;
import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
-import static org.apache.ignite.cache.CacheMemoryMode.ONHEAP_TIERED;
/**
* Queue multi node test.
*/
public class GridCachePartitionedAtomicQueueMultiNodeSelfTest extends GridCachePartitionedQueueMultiNodeSelfTest {
/** {@inheritDoc} */
- @Override protected CacheMemoryMode collectionMemoryMode() {
- return ONHEAP_TIERED;
- }
-
- /** {@inheritDoc} */
@Override protected CacheAtomicityMode collectionCacheAtomicityMode() {
return ATOMIC;
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicQueueRotativeMultiNodeTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicQueueRotativeMultiNodeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicQueueRotativeMultiNodeTest.java
index 55c6682..37dbfa1 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicQueueRotativeMultiNodeTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicQueueRotativeMultiNodeTest.java
@@ -18,10 +18,8 @@
package org.apache.ignite.internal.processors.cache.datastructures.partitioned;
import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMemoryMode;
import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
-import static org.apache.ignite.cache.CacheMemoryMode.ONHEAP_TIERED;
/**
* Sequence multi node tests.
@@ -29,11 +27,6 @@ import static org.apache.ignite.cache.CacheMemoryMode.ONHEAP_TIERED;
public class GridCachePartitionedAtomicQueueRotativeMultiNodeTest extends
GridCachePartitionedQueueRotativeMultiNodeTest {
/** {@inheritDoc} */
- @Override protected CacheMemoryMode collectionMemoryMode() {
- return ONHEAP_TIERED;
- }
-
- /** {@inheritDoc} */
@Override protected CacheAtomicityMode collectionCacheAtomicityMode() {
return ATOMIC;
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicSetFailoverSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicSetFailoverSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicSetFailoverSelfTest.java
index 8ff95c7..c2af2b1 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicSetFailoverSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicSetFailoverSelfTest.java
@@ -18,22 +18,15 @@
package org.apache.ignite.internal.processors.cache.datastructures.partitioned;
import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMemoryMode;
import org.apache.ignite.internal.processors.cache.datastructures.GridCacheSetFailoverAbstractSelfTest;
import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
-import static org.apache.ignite.cache.CacheMemoryMode.ONHEAP_TIERED;
/**
* Set failover tests.
*/
public class GridCachePartitionedAtomicSetFailoverSelfTest extends GridCacheSetFailoverAbstractSelfTest {
/** {@inheritDoc} */
- @Override protected CacheMemoryMode collectionMemoryMode() {
- return ONHEAP_TIERED;
- }
-
- /** {@inheritDoc} */
@Override protected CacheAtomicityMode collectionCacheAtomicityMode() {
return ATOMIC;
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedDataStructuresFailoverSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedDataStructuresFailoverSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedDataStructuresFailoverSelfTest.java
index 6c880a5..ecb2df9 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedDataStructuresFailoverSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedDataStructuresFailoverSelfTest.java
@@ -18,12 +18,10 @@
package org.apache.ignite.internal.processors.cache.datastructures.partitioned;
import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMemoryMode;
import org.apache.ignite.cache.CacheMode;
import org.apache.ignite.internal.processors.cache.datastructures.GridCacheAbstractDataStructuresFailoverSelfTest;
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;
/**
@@ -37,11 +35,6 @@ public class GridCachePartitionedDataStructuresFailoverSelfTest
}
/** {@inheritDoc} */
- @Override protected CacheMemoryMode collectionMemoryMode() {
- return ONHEAP_TIERED;
- }
-
- /** {@inheritDoc} */
@Override protected CacheAtomicityMode collectionCacheAtomicityMode() {
return TRANSACTIONAL;
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedOffHeapValuesQueueApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedOffHeapValuesQueueApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedOffHeapValuesQueueApiSelfTest.java
deleted file mode 100644
index d46f684..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedOffHeapValuesQueueApiSelfTest.java
+++ /dev/null
@@ -1,35 +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.datastructures.partitioned;
-
-import org.apache.ignite.cache.CacheMemoryMode;
-
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_VALUES;
-
-/**
- * Queue tests with partitioned cache.
- */
-public class GridCachePartitionedOffHeapValuesQueueApiSelfTest extends GridCachePartitionedQueueApiSelfTest {
- /** {@inheritDoc} */
- @Override protected CacheMemoryMode collectionMemoryMode() {
- return OFFHEAP_VALUES;
- }
-
- @Override public void testQueueRemoveMultithreadBounded(){
- fail("https://issues.apache.org/jira/browse/IGNITE-1592");
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedOffHeapValuesSetSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedOffHeapValuesSetSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedOffHeapValuesSetSelfTest.java
deleted file mode 100644
index f6df67e..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedOffHeapValuesSetSelfTest.java
+++ /dev/null
@@ -1,32 +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.datastructures.partitioned;
-
-import org.apache.ignite.cache.CacheMemoryMode;
-
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_VALUES;
-
-/**
- * Set tests with off-heap values cache memory mode.
- */
-public class GridCachePartitionedOffHeapValuesSetSelfTest extends GridCachePartitionedSetSelfTest {
- /** {@inheritDoc} */
- @Override protected CacheMemoryMode collectionMemoryMode() {
- return OFFHEAP_VALUES;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedOffheapDataStructuresFailoverSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedOffheapDataStructuresFailoverSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedOffheapDataStructuresFailoverSelfTest.java
deleted file mode 100644
index b3ded7f..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedOffheapDataStructuresFailoverSelfTest.java
+++ /dev/null
@@ -1,33 +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.datastructures.partitioned;
-
-import org.apache.ignite.cache.CacheMemoryMode;
-
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
-
-/**
- * Failover tests for cache data structures.
- */
-public class GridCachePartitionedOffheapDataStructuresFailoverSelfTest
- extends GridCachePartitionedDataStructuresFailoverSelfTest {
- /** {@inheritDoc} */
- @Override protected CacheMemoryMode collectionMemoryMode() {
- return OFFHEAP_TIERED;
- }
-}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedOffheapSetFailoverSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedOffheapSetFailoverSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedOffheapSetFailoverSelfTest.java
deleted file mode 100644
index f28de20..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedOffheapSetFailoverSelfTest.java
+++ /dev/null
@@ -1,32 +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.datastructures.partitioned;
-
-import org.apache.ignite.cache.CacheMemoryMode;
-
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
-
-/**
- * Set failover tests.
- */
-public class GridCachePartitionedOffheapSetFailoverSelfTest extends GridCachePartitionedSetFailoverSelfTest {
- /** {@inheritDoc} */
- @Override protected CacheMemoryMode collectionMemoryMode() {
- return OFFHEAP_TIERED;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueApiSelfTest.java
index de2fa07..3c14a88 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueApiSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueApiSelfTest.java
@@ -18,12 +18,10 @@
package org.apache.ignite.internal.processors.cache.datastructures.partitioned;
import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMemoryMode;
import org.apache.ignite.cache.CacheMode;
import org.apache.ignite.internal.processors.cache.datastructures.GridCacheQueueApiSelfAbstractTest;
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;
/**
@@ -41,11 +39,6 @@ public class GridCachePartitionedQueueApiSelfTest extends GridCacheQueueApiSelfA
}
/** {@inheritDoc} */
- @Override protected CacheMemoryMode collectionMemoryMode() {
- return ONHEAP_TIERED;
- }
-
- /** {@inheritDoc} */
@Override protected CacheAtomicityMode collectionCacheAtomicityMode() {
return TRANSACTIONAL;
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueCreateMultiNodeSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueCreateMultiNodeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueCreateMultiNodeSelfTest.java
index 78d6027..cbfee5a 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueCreateMultiNodeSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueCreateMultiNodeSelfTest.java
@@ -26,7 +26,6 @@ import org.apache.ignite.Ignite;
import org.apache.ignite.IgniteCache;
import org.apache.ignite.IgniteQueue;
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;
@@ -38,7 +37,6 @@ import org.apache.ignite.transactions.Transaction;
import static java.util.concurrent.TimeUnit.MILLISECONDS;
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.CacheRebalanceMode.SYNC;
import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
@@ -60,11 +58,6 @@ public class GridCachePartitionedQueueCreateMultiNodeSelfTest extends IgniteColl
}
/** {@inheritDoc} */
- @Override protected CacheMemoryMode collectionMemoryMode() {
- return ONHEAP_TIERED;
- }
-
- /** {@inheritDoc} */
@Override protected CacheAtomicityMode collectionCacheAtomicityMode() {
return TRANSACTIONAL;
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueEntryMoveSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueEntryMoveSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueEntryMoveSelfTest.java
index db11291..e9c1fd7 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueEntryMoveSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueEntryMoveSelfTest.java
@@ -26,7 +26,6 @@ import org.apache.ignite.Ignite;
import org.apache.ignite.IgniteCheckedException;
import org.apache.ignite.IgniteQueue;
import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMemoryMode;
import org.apache.ignite.cache.CacheMode;
import org.apache.ignite.cache.affinity.AffinityFunction;
import org.apache.ignite.cluster.ClusterNode;
@@ -41,7 +40,6 @@ import org.apache.ignite.internal.util.typedef.internal.U;
import org.apache.ignite.testframework.GridTestUtils;
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;
/**
@@ -68,11 +66,6 @@ public class GridCachePartitionedQueueEntryMoveSelfTest extends IgniteCollection
}
/** {@inheritDoc} */
- @Override protected CacheMemoryMode collectionMemoryMode() {
- return ONHEAP_TIERED;
- }
-
- /** {@inheritDoc} */
@Override protected CacheAtomicityMode collectionCacheAtomicityMode() {
return TRANSACTIONAL;
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueFailoverDataConsistencySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueFailoverDataConsistencySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueFailoverDataConsistencySelfTest.java
index bef2b22..694dd0b 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueFailoverDataConsistencySelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueFailoverDataConsistencySelfTest.java
@@ -18,11 +18,9 @@
package org.apache.ignite.internal.processors.cache.datastructures.partitioned;
import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMemoryMode;
import org.apache.ignite.internal.processors.cache.datastructures.GridCacheAbstractQueueFailoverDataConsistencySelfTest;
import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-import static org.apache.ignite.cache.CacheMemoryMode.ONHEAP_TIERED;
/**
* Queue failover test for transactional cache.
@@ -30,11 +28,6 @@ import static org.apache.ignite.cache.CacheMemoryMode.ONHEAP_TIERED;
public class GridCachePartitionedQueueFailoverDataConsistencySelfTest extends
GridCacheAbstractQueueFailoverDataConsistencySelfTest {
/** {@inheritDoc} */
- @Override protected CacheMemoryMode collectionMemoryMode() {
- return ONHEAP_TIERED;
- }
-
- /** {@inheritDoc} */
@Override protected CacheAtomicityMode collectionCacheAtomicityMode() {
return TRANSACTIONAL;
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueJoinedNodeSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueJoinedNodeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueJoinedNodeSelfTest.java
index 221f5fc..5edf7ca 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueJoinedNodeSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueJoinedNodeSelfTest.java
@@ -18,12 +18,10 @@
package org.apache.ignite.internal.processors.cache.datastructures.partitioned;
import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMemoryMode;
import org.apache.ignite.cache.CacheMode;
import org.apache.ignite.internal.processors.cache.datastructures.GridCacheQueueJoinedNodeSelfAbstractTest;
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;
/**
@@ -36,11 +34,6 @@ public class GridCachePartitionedQueueJoinedNodeSelfTest extends GridCacheQueueJ
}
/** {@inheritDoc} */
- @Override protected CacheMemoryMode collectionMemoryMode() {
- return ONHEAP_TIERED;
- }
-
- /** {@inheritDoc} */
@Override protected CacheAtomicityMode collectionCacheAtomicityMode() {
return TRANSACTIONAL;
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueMultiNodeSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueMultiNodeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueMultiNodeSelfTest.java
index bcc9831..82ef404 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueMultiNodeSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueMultiNodeSelfTest.java
@@ -18,12 +18,10 @@
package org.apache.ignite.internal.processors.cache.datastructures.partitioned;
import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMemoryMode;
import org.apache.ignite.cache.CacheMode;
import org.apache.ignite.internal.processors.cache.datastructures.GridCacheQueueMultiNodeAbstractSelfTest;
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;
/**
@@ -36,11 +34,6 @@ public class GridCachePartitionedQueueMultiNodeSelfTest extends GridCacheQueueMu
}
/** {@inheritDoc} */
- @Override protected CacheMemoryMode collectionMemoryMode() {
- return ONHEAP_TIERED;
- }
-
- /** {@inheritDoc} */
@Override protected CacheAtomicityMode collectionCacheAtomicityMode() {
return TRANSACTIONAL;
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueRotativeMultiNodeTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueRotativeMultiNodeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueRotativeMultiNodeTest.java
index c3d1d02..8b112c1 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueRotativeMultiNodeTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueRotativeMultiNodeTest.java
@@ -18,12 +18,10 @@
package org.apache.ignite.internal.processors.cache.datastructures.partitioned;
import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMemoryMode;
import org.apache.ignite.cache.CacheMode;
import org.apache.ignite.internal.processors.cache.datastructures.GridCacheQueueRotativeMultiNodeAbstractTest;
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;
/**
@@ -36,11 +34,6 @@ public class GridCachePartitionedQueueRotativeMultiNodeTest extends GridCacheQue
}
/** {@inheritDoc} */
- @Override protected CacheMemoryMode collectionMemoryMode() {
- return ONHEAP_TIERED;
- }
-
- /** {@inheritDoc} */
@Override protected CacheAtomicityMode collectionCacheAtomicityMode() {
return TRANSACTIONAL;
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedSetFailoverSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedSetFailoverSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedSetFailoverSelfTest.java
index 755ac91..ec57dea 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedSetFailoverSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedSetFailoverSelfTest.java
@@ -18,11 +18,9 @@
package org.apache.ignite.internal.processors.cache.datastructures.partitioned;
import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMemoryMode;
import org.apache.ignite.internal.processors.cache.datastructures.GridCacheSetFailoverAbstractSelfTest;
import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-import static org.apache.ignite.cache.CacheMemoryMode.ONHEAP_TIERED;
/**
* Set failover tests.
@@ -33,11 +31,6 @@ public class GridCachePartitionedSetFailoverSelfTest extends GridCacheSetFailove
return TRANSACTIONAL;
}
- /** {@inheritDoc} */
- @Override protected CacheMemoryMode collectionMemoryMode() {
- return ONHEAP_TIERED;
- }
-
@Override public void testNodeRestart(){
fail("https://issues.apache.org/jira/browse/IGNITE-1593");
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedSetSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedSetSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedSetSelfTest.java
index 7c97bec..36a2ecc 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedSetSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedSetSelfTest.java
@@ -18,12 +18,10 @@
package org.apache.ignite.internal.processors.cache.datastructures.partitioned;
import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMemoryMode;
import org.apache.ignite.cache.CacheMode;
import org.apache.ignite.internal.processors.cache.datastructures.GridCacheSetAbstractSelfTest;
import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
import static org.apache.ignite.cache.CacheMode.PARTITIONED;
/**
@@ -36,11 +34,6 @@ public class GridCachePartitionedSetSelfTest extends GridCacheSetAbstractSelfTes
}
/** {@inheritDoc} */
- @Override protected CacheMemoryMode collectionMemoryMode() {
- return OFFHEAP_TIERED;
- }
-
- /** {@inheritDoc} */
@Override protected CacheAtomicityMode collectionCacheAtomicityMode() {
return TRANSACTIONAL;
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/IgnitePartitionedQueueNoBackupsTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/IgnitePartitionedQueueNoBackupsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/IgnitePartitionedQueueNoBackupsTest.java
index f57e1c9..67b7f8f 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/IgnitePartitionedQueueNoBackupsTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/IgnitePartitionedQueueNoBackupsTest.java
@@ -21,7 +21,6 @@ import java.util.Iterator;
import java.util.UUID;
import org.apache.ignite.IgniteQueue;
import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMemoryMode;
import org.apache.ignite.cache.CacheMode;
import org.apache.ignite.configuration.CollectionConfiguration;
import org.apache.ignite.internal.IgniteKernal;
@@ -30,7 +29,6 @@ import org.apache.ignite.internal.processors.cache.GridCacheMapEntry;
import org.apache.ignite.testframework.GridTestUtils;
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;
/**
@@ -43,11 +41,6 @@ public class IgnitePartitionedQueueNoBackupsTest extends GridCachePartitionedQue
}
/** {@inheritDoc} */
- @Override protected CacheMemoryMode collectionMemoryMode() {
- return ONHEAP_TIERED;
- }
-
- /** {@inheritDoc} */
@Override protected CacheAtomicityMode collectionCacheAtomicityMode() {
return ATOMIC;
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/replicated/GridCacheReplicatedDataStructuresFailoverSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/replicated/GridCacheReplicatedDataStructuresFailoverSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/replicated/GridCacheReplicatedDataStructuresFailoverSelfTest.java
index 28ce901..b093d12 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/replicated/GridCacheReplicatedDataStructuresFailoverSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/replicated/GridCacheReplicatedDataStructuresFailoverSelfTest.java
@@ -18,12 +18,10 @@
package org.apache.ignite.internal.processors.cache.datastructures.replicated;
import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMemoryMode;
import org.apache.ignite.cache.CacheMode;
import org.apache.ignite.internal.processors.cache.datastructures.GridCacheAbstractDataStructuresFailoverSelfTest;
import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-import static org.apache.ignite.cache.CacheMemoryMode.ONHEAP_TIERED;
import static org.apache.ignite.cache.CacheMode.REPLICATED;
/**
@@ -37,11 +35,6 @@ public class GridCacheReplicatedDataStructuresFailoverSelfTest
}
/** {@inheritDoc} */
- @Override protected CacheMemoryMode collectionMemoryMode() {
- return ONHEAP_TIERED;
- }
-
- /** {@inheritDoc} */
@Override protected CacheAtomicityMode collectionCacheAtomicityMode() {
return TRANSACTIONAL;
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/replicated/GridCacheReplicatedQueueApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/replicated/GridCacheReplicatedQueueApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/replicated/GridCacheReplicatedQueueApiSelfTest.java
index bad37a9..3023b7e 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/replicated/GridCacheReplicatedQueueApiSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/replicated/GridCacheReplicatedQueueApiSelfTest.java
@@ -18,12 +18,10 @@
package org.apache.ignite.internal.processors.cache.datastructures.replicated;
import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMemoryMode;
import org.apache.ignite.cache.CacheMode;
import org.apache.ignite.internal.processors.cache.datastructures.GridCacheQueueApiSelfAbstractTest;
import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
import static org.apache.ignite.cache.CacheMode.REPLICATED;
/**
@@ -41,11 +39,6 @@ public class GridCacheReplicatedQueueApiSelfTest extends GridCacheQueueApiSelfAb
}
/** {@inheritDoc} */
- @Override protected CacheMemoryMode collectionMemoryMode() {
- return OFFHEAP_TIERED;
- }
-
- /** {@inheritDoc} */
@Override protected long collectionOffHeapMaxMemory() {
return 0;
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/replicated/GridCacheReplicatedQueueMultiNodeSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/replicated/GridCacheReplicatedQueueMultiNodeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/replicated/GridCacheReplicatedQueueMultiNodeSelfTest.java
index 54fcb73..74c8af1 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/replicated/GridCacheReplicatedQueueMultiNodeSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/replicated/GridCacheReplicatedQueueMultiNodeSelfTest.java
@@ -18,12 +18,10 @@
package org.apache.ignite.internal.processors.cache.datastructures.replicated;
import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMemoryMode;
import org.apache.ignite.cache.CacheMode;
import org.apache.ignite.internal.processors.cache.datastructures.GridCacheQueueMultiNodeAbstractSelfTest;
import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-import static org.apache.ignite.cache.CacheMemoryMode.ONHEAP_TIERED;
import static org.apache.ignite.cache.CacheMode.REPLICATED;
/**
@@ -36,11 +34,6 @@ public class GridCacheReplicatedQueueMultiNodeSelfTest extends GridCacheQueueMul
}
/** {@inheritDoc} */
- @Override protected CacheMemoryMode collectionMemoryMode() {
- return ONHEAP_TIERED;
- }
-
- /** {@inheritDoc} */
@Override protected CacheAtomicityMode collectionCacheAtomicityMode() {
return TRANSACTIONAL;
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/replicated/GridCacheReplicatedQueueRotativeMultiNodeTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/replicated/GridCacheReplicatedQueueRotativeMultiNodeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/replicated/GridCacheReplicatedQueueRotativeMultiNodeTest.java
index 4046b56..934bbd2 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/replicated/GridCacheReplicatedQueueRotativeMultiNodeTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/replicated/GridCacheReplicatedQueueRotativeMultiNodeTest.java
@@ -18,12 +18,10 @@
package org.apache.ignite.internal.processors.cache.datastructures.replicated;
import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMemoryMode;
import org.apache.ignite.cache.CacheMode;
import org.apache.ignite.internal.processors.cache.datastructures.GridCacheQueueRotativeMultiNodeAbstractTest;
import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-import static org.apache.ignite.cache.CacheMemoryMode.ONHEAP_TIERED;
import static org.apache.ignite.cache.CacheMode.REPLICATED;
/**
@@ -36,11 +34,6 @@ public class GridCacheReplicatedQueueRotativeMultiNodeTest extends GridCacheQueu
}
/** {@inheritDoc} */
- @Override protected CacheMemoryMode collectionMemoryMode() {
- return ONHEAP_TIERED;
- }
-
- /** {@inheritDoc} */
@Override protected CacheAtomicityMode collectionCacheAtomicityMode() {
return TRANSACTIONAL;
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/replicated/GridCacheReplicatedSetSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/replicated/GridCacheReplicatedSetSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/replicated/GridCacheReplicatedSetSelfTest.java
index 59ebb23..fe6fd3e 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/replicated/GridCacheReplicatedSetSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/replicated/GridCacheReplicatedSetSelfTest.java
@@ -18,12 +18,10 @@
package org.apache.ignite.internal.processors.cache.datastructures.replicated;
import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMemoryMode;
import org.apache.ignite.cache.CacheMode;
import org.apache.ignite.internal.processors.cache.datastructures.GridCacheSetAbstractSelfTest;
import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-import static org.apache.ignite.cache.CacheMemoryMode.ONHEAP_TIERED;
import static org.apache.ignite.cache.CacheMode.REPLICATED;
/**
@@ -36,11 +34,6 @@ public class GridCacheReplicatedSetSelfTest extends GridCacheSetAbstractSelfTest
}
/** {@inheritDoc} */
- @Override protected CacheMemoryMode collectionMemoryMode() {
- return ONHEAP_TIERED;
- }
-
- /** {@inheritDoc} */
@Override protected CacheAtomicityMode collectionCacheAtomicityMode() {
return TRANSACTIONAL;
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractDistributedByteArrayValuesSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractDistributedByteArrayValuesSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractDistributedByteArrayValuesSelfTest.java
index 2b4f520..75aadc5 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractDistributedByteArrayValuesSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractDistributedByteArrayValuesSelfTest.java
@@ -45,19 +45,11 @@ public abstract class GridCacheAbstractDistributedByteArrayValuesSelfTest extend
/** Regular caches. */
private static IgniteCache<Integer, Object>[] caches;
- /** Offheap values caches. */
- private static IgniteCache<Integer, Object>[] cachesOffheap;
-
- /** Offheap tiered caches. */
- private static IgniteCache<Integer, Object>[] cachesOffheapTiered;
-
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration c = super.getConfiguration(igniteInstanceName);
- c.setCacheConfiguration(cacheConfiguration(),
- offheapCacheConfiguration(),
- offheapTieredCacheConfiguration());
+ c.setCacheConfiguration(cacheConfiguration());
c.setPeerClassLoadingEnabled(peerClassLoading());
@@ -92,38 +84,6 @@ public abstract class GridCacheAbstractDistributedByteArrayValuesSelfTest extend
*/
protected abstract CacheConfiguration cacheConfiguration0();
- /**
- * @return Offheap cache configuration.
- */
- protected CacheConfiguration offheapCacheConfiguration() {
- CacheConfiguration cfg = offheapCacheConfiguration0();
-
- cfg.setName(CACHE_OFFHEAP);
-
- return cfg;
- }
-
- /**
- * @return Offheap tiered cache configuration.
- */
- protected CacheConfiguration offheapTieredCacheConfiguration() {
- CacheConfiguration cfg = offheapTieredCacheConfiguration0();
-
- cfg.setName(CACHE_OFFHEAP_TIERED);
-
- return cfg;
- }
-
- /**
- * @return Internal offheap cache configuration.
- */
- protected abstract CacheConfiguration offheapCacheConfiguration0();
-
- /**
- * @return Internal offheap cache configuration.
- */
- protected abstract CacheConfiguration offheapTieredCacheConfiguration0();
-
/** {@inheritDoc} */
@SuppressWarnings("unchecked")
@Override protected void beforeTestsStarted() throws Exception {
@@ -134,15 +94,11 @@ public abstract class GridCacheAbstractDistributedByteArrayValuesSelfTest extend
ignites = new Ignite[gridCnt];
caches = new IgniteCache[gridCnt];
- cachesOffheap = new IgniteCache[gridCnt];
- cachesOffheapTiered = new IgniteCache[gridCnt];
for (int i = 0; i < gridCnt; i++) {
ignites[i] = startGrid(i);
caches[i] = ignites[i].cache(CACHE_REGULAR);
- cachesOffheap[i] = ignites[i].cache(CACHE_OFFHEAP);
- cachesOffheapTiered[i] = ignites[i].cache(CACHE_OFFHEAP_TIERED);
}
}
@@ -151,8 +107,6 @@ public abstract class GridCacheAbstractDistributedByteArrayValuesSelfTest extend
super.afterTestsStopped();
caches = null;
- cachesOffheap = null;
- cachesOffheapTiered = null;
ignites = null;
}
@@ -176,42 +130,6 @@ public abstract class GridCacheAbstractDistributedByteArrayValuesSelfTest extend
}
/**
- * Check whether offheap cache with byte array entry works correctly in PESSIMISTIC transaction.
- *
- * @throws Exception If failed.
- */
- public void testPessimisticOffheap() throws Exception {
- testTransaction0(cachesOffheap, PESSIMISTIC, KEY_1, wrap(1));
- }
-
- /**
- * Check whether offheap cache with byte array entry works correctly in PESSIMISTIC transaction.
- *
- * @throws Exception If failed.
- */
- public void testPessimisticOffheapTiered() throws Exception {
- testTransaction0(cachesOffheapTiered, PESSIMISTIC, KEY_1, wrap(1));
- }
-
- /**
- * Check whether offheap cache with byte array entry works correctly in PESSIMISTIC transaction.
- *
- * @throws Exception If failed.
- */
- public void testPessimisticOffheapMixed() throws Exception {
- testTransactionMixed0(cachesOffheap, PESSIMISTIC, KEY_1, wrap(1), KEY_2, 1);
- }
-
- /**
- * Check whether offheap cache with byte array entry works correctly in PESSIMISTIC transaction.
- *
- * @throws Exception If failed.
- */
- public void testPessimisticOffheapTieredMixed() throws Exception {
- testTransactionMixed0(cachesOffheapTiered, PESSIMISTIC, KEY_1, wrap(1), KEY_2, 1);
- }
-
- /**
* Check whether cache with byte array entry works correctly in OPTIMISTIC transaction.
*
* @throws Exception If failed.
@@ -230,42 +148,6 @@ public abstract class GridCacheAbstractDistributedByteArrayValuesSelfTest extend
}
/**
- * Check whether offheap cache with byte array entry works correctly in OPTIMISTIC transaction.
- *
- * @throws Exception If failed.
- */
- public void testOptimisticOffheap() throws Exception {
- testTransaction0(cachesOffheap, OPTIMISTIC, KEY_1, wrap(1));
- }
-
- /**
- * Check whether offheap cache with byte array entry works correctly in OPTIMISTIC transaction.
- *
- * @throws Exception If failed.
- */
- public void testOptimisticOffheapTiered() throws Exception {
- testTransaction0(cachesOffheapTiered, OPTIMISTIC, KEY_1, wrap(1));
- }
-
- /**
- * Check whether offheap cache with byte array entry works correctly in OPTIMISTIC transaction.
- *
- * @throws Exception If failed.
- */
- public void testOptimisticOffheapMixed() throws Exception {
- testTransactionMixed0(cachesOffheap, OPTIMISTIC, KEY_1, wrap(1), KEY_2, 1);
- }
-
- /**
- * Check whether offheap cache with byte array entry works correctly in OPTIMISTIC transaction.
- *
- * @throws Exception If failed.
- */
- public void testOptimisticOffheapTieredMixed() throws Exception {
- testTransactionMixed0(cachesOffheapTiered, OPTIMISTIC, KEY_1, wrap(1), KEY_2, 1);
- }
-
- /**
* Test swapping.
*
* @throws Exception If failed.
[12/17] ignite git commit: IGNITE-4535 - Add option to store
deserialized values on-heap
Posted by ag...@apache.org.
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/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 3b9f864..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,8 +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.OFFHEAP_TIERED;
-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;
@@ -108,56 +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));
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testAtomicOffheap() throws Exception {
- updateAndEventConsistencyTest(cacheConfiguration(ATOMIC, OFFHEAP_TIERED, 1));
+ 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));
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testTxOffheap() throws Exception {
- updateAndEventConsistencyTest(cacheConfiguration(TRANSACTIONAL, OFFHEAP_TIERED, 1));
+ updateAndEventConsistencyTest(cacheConfiguration(TRANSACTIONAL, 2));
}
/**
@@ -347,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<TestKey, TestValue> cacheConfiguration(CacheAtomicityMode atomicityMode,
- CacheMemoryMode memoryMode,
- int backups) {
+ private CacheConfiguration<TestKey, TestValue> cacheConfiguration(CacheAtomicityMode atomicityMode, int backups) {
CacheConfiguration<TestKey, TestValue> 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/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInterceptorSelfTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInterceptorSelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInterceptorSelfTestSuite.java
index 695d8b8..0549df7 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInterceptorSelfTestSuite.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInterceptorSelfTestSuite.java
@@ -62,8 +62,6 @@ public class IgniteCacheInterceptorSelfTestSuite extends TestSuite {
suite.addTestSuite(GridCacheInterceptorAtomicRebalanceTest.class);
suite.addTestSuite(GridCacheInterceptorTransactionalRebalanceTest.class);
- suite.addTestSuite(GridCacheInterceptorAtomicOffheapRebalanceTest.class);
- suite.addTestSuite(GridCacheInterceptorTransactionalOffheapRebalanceTest.class);
return suite;
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/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/c56c4b8c/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 b451abf..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,8 +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.OFFHEAP_TIERED;
-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;
@@ -38,69 +36,55 @@ public class IgniteCacheInvokeReadThroughSingleNodeTest extends IgniteCacheInvok
* @throws Exception If failed.
*/
public void testInvokeReadThroughAtomic() throws Exception {
- invokeReadThrough(cacheConfiguration(PARTITIONED, ATOMIC, ONHEAP_TIERED, 1, false));
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testInvokeReadThroughAtomic_Offheap() throws Exception {
- invokeReadThrough(cacheConfiguration(PARTITIONED, ATOMIC, OFFHEAP_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));
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testInvokeReadThroughTx_Offheap() throws Exception {
- invokeReadThrough(cacheConfiguration(PARTITIONED, TRANSACTIONAL, OFFHEAP_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));
}
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeReadThroughTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeReadThroughTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeReadThroughTest.java
index 9578227..8fd3758 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeReadThroughTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeReadThroughTest.java
@@ -19,8 +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.OFFHEAP_TIERED;
-import static org.apache.ignite.cache.CacheMemoryMode.ONHEAP_TIERED;
import static org.apache.ignite.cache.CacheMode.PARTITIONED;
import static org.apache.ignite.cache.CacheMode.REPLICATED;
@@ -41,139 +39,69 @@ public class IgniteCacheInvokeReadThroughTest extends IgniteCacheInvokeReadThrou
* @throws Exception If failed.
*/
public void testInvokeReadThroughAtomic0() throws Exception {
- invokeReadThrough(cacheConfiguration(PARTITIONED, ATOMIC, ONHEAP_TIERED, 0, false));
+ invokeReadThrough(cacheConfiguration(PARTITIONED, ATOMIC, 0, false));
}
/**
* @throws Exception If failed.
*/
public void testInvokeReadThroughAtomic1() throws Exception {
- invokeReadThrough(cacheConfiguration(PARTITIONED, ATOMIC, ONHEAP_TIERED, 1, false));
+ invokeReadThrough(cacheConfiguration(PARTITIONED, ATOMIC, 1, false));
}
/**
* @throws Exception If failed.
*/
public void testInvokeReadThroughAtomic2() throws Exception {
- invokeReadThrough(cacheConfiguration(PARTITIONED, ATOMIC, ONHEAP_TIERED, 2, false));
+ invokeReadThrough(cacheConfiguration(PARTITIONED, ATOMIC, 2, 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));
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testInvokeReadThroughAtomic0_Offheap() throws Exception {
- invokeReadThrough(cacheConfiguration(PARTITIONED, ATOMIC, OFFHEAP_TIERED, 0, false));
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testInvokeReadThroughAtomic1_Offheap() throws Exception {
- invokeReadThrough(cacheConfiguration(PARTITIONED, ATOMIC, OFFHEAP_TIERED, 1, false));
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testInvokeReadThroughAtomic2_Offheap() throws Exception {
- invokeReadThrough(cacheConfiguration(PARTITIONED, ATOMIC, OFFHEAP_TIERED, 2, false));
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testInvokeReadThroughAtomicNearCache_Offheap() throws Exception {
- invokeReadThrough(cacheConfiguration(PARTITIONED, ATOMIC, OFFHEAP_TIERED, 1, true));
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testInvokeReadThroughAtomicReplicated_Offheap() throws Exception {
- invokeReadThrough(cacheConfiguration(REPLICATED, ATOMIC, OFFHEAP_TIERED, 0, false));
+ invokeReadThrough(cacheConfiguration(REPLICATED, ATOMIC, 0, false));
}
/**
* @throws Exception If failed.
*/
public void testInvokeReadThroughTx0() throws Exception {
- invokeReadThrough(cacheConfiguration(PARTITIONED, TRANSACTIONAL, ONHEAP_TIERED, 0, false));
+ invokeReadThrough(cacheConfiguration(PARTITIONED, TRANSACTIONAL, 0, false));
}
/**
* @throws Exception If failed.
*/
public void testInvokeReadThroughTx1() throws Exception {
- invokeReadThrough(cacheConfiguration(PARTITIONED, TRANSACTIONAL, ONHEAP_TIERED, 1, false));
+ invokeReadThrough(cacheConfiguration(PARTITIONED, TRANSACTIONAL, 1, false));
}
/**
* @throws Exception If failed.
*/
public void testInvokeReadThroughTx2() throws Exception {
- invokeReadThrough(cacheConfiguration(PARTITIONED, TRANSACTIONAL, ONHEAP_TIERED, 2, false));
+ invokeReadThrough(cacheConfiguration(PARTITIONED, TRANSACTIONAL, 2, 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));
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testInvokeReadThroughTx0_Offheap() throws Exception {
- invokeReadThrough(cacheConfiguration(PARTITIONED, TRANSACTIONAL, OFFHEAP_TIERED, 0, false));
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testInvokeReadThroughTx1_Offheap() throws Exception {
- invokeReadThrough(cacheConfiguration(PARTITIONED, TRANSACTIONAL, OFFHEAP_TIERED, 1, false));
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testInvokeReadThroughTx2_Offheap() throws Exception {
- invokeReadThrough(cacheConfiguration(PARTITIONED, TRANSACTIONAL, OFFHEAP_TIERED, 2, false));
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testInvokeReadThroughTxNearCache_Offheap() throws Exception {
- invokeReadThrough(cacheConfiguration(PARTITIONED, TRANSACTIONAL, OFFHEAP_TIERED, 1, true));
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testInvokeReadThroughTxReplicated_Offheap() throws Exception {
- invokeReadThrough(cacheConfiguration(REPLICATED, TRANSACTIONAL, OFFHEAP_TIERED, 0, false));
+ invokeReadThrough(cacheConfiguration(REPLICATED, TRANSACTIONAL, 0, false));
}
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheLoadRebalanceEvictionSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheLoadRebalanceEvictionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheLoadRebalanceEvictionSelfTest.java
index 007515b..3c50043 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheLoadRebalanceEvictionSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheLoadRebalanceEvictionSelfTest.java
@@ -75,12 +75,11 @@ public class IgniteCacheLoadRebalanceEvictionSelfTest extends GridCommonAbstract
CacheConfiguration<String, byte[]> cacheCfg = new CacheConfiguration<>();
cacheCfg.setAtomicityMode(CacheAtomicityMode.ATOMIC);
- cacheCfg.setEvictSynchronized(false);
cacheCfg.setCacheMode(CacheMode.PARTITIONED);
cacheCfg.setBackups(1);
cacheCfg.setReadFromBackup(true);
cacheCfg.setEvictionPolicy(evictionPolicy);
- cacheCfg.setOffHeapMaxMemory(1024 * 1024 * 1024L);
+ cacheCfg.setOnheapCacheEnabled(true);
cacheCfg.setStatisticsEnabled(true);
cacheCfg.setWriteThrough(false);
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingNearErrorTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingNearErrorTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingNearErrorTest.java
index e020ae4..a4a831f 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingNearErrorTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingNearErrorTest.java
@@ -35,10 +35,8 @@ public class IgniteCacheP2pUnmarshallingNearErrorTest extends IgniteCacheP2pUnma
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
if (cfg.isClientMode() == null || !cfg.isClientMode()) {
- cfg.getCacheConfiguration()[0].setEvictMaxOverflowRatio(0);
- cfg.getCacheConfiguration()[0].setEvictSynchronized(true);
- cfg.getCacheConfiguration()[0].setEvictSynchronizedKeyBufferSize(1);
cfg.getCacheConfiguration()[0].setEvictionPolicy(new FifoEvictionPolicy(1));
+ cfg.getCacheConfiguration()[0].setOnheapCacheEnabled(true);
}
return cfg;
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachePeekModesAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachePeekModesAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachePeekModesAbstractTest.java
index e55f676..8681be2 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachePeekModesAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachePeekModesAbstractTest.java
@@ -29,7 +29,6 @@ import javax.cache.Cache;
import org.apache.ignite.Ignite;
import org.apache.ignite.IgniteCache;
import org.apache.ignite.IgniteCheckedException;
-import org.apache.ignite.cache.CacheMemoryMode;
import org.apache.ignite.cache.CachePeekMode;
import org.apache.ignite.cache.affinity.Affinity;
import org.apache.ignite.cache.eviction.fifo.FifoEvictionPolicy;
@@ -53,7 +52,6 @@ import static org.apache.ignite.cache.CachePeekMode.NEAR;
import static org.apache.ignite.cache.CachePeekMode.OFFHEAP;
import static org.apache.ignite.cache.CachePeekMode.ONHEAP;
import static org.apache.ignite.cache.CachePeekMode.PRIMARY;
-import static org.apache.ignite.cache.CachePeekMode.SWAP;
/**
* Tests for methods using {@link CachePeekMode}:
@@ -91,10 +89,6 @@ public abstract class IgniteCachePeekModesAbstractTest extends IgniteCacheAbstra
@Override protected CacheConfiguration cacheConfiguration(String igniteInstanceName) throws Exception {
CacheConfiguration ccfg = super.cacheConfiguration(igniteInstanceName);
- ccfg.setMemoryMode(CacheMemoryMode.ONHEAP_TIERED);
-
- ccfg.setOffHeapMaxMemory(512);
-
ccfg.setBackups(1);
if (hasNearCache())
@@ -104,15 +98,11 @@ public abstract class IgniteCachePeekModesAbstractTest extends IgniteCacheAbstra
plc.setMaxSize(HEAP_ENTRIES);
ccfg.setEvictionPolicy(plc);
+ ccfg.setOnheapCacheEnabled(true);
return ccfg;
}
- /** {@inheritDoc} */
- @Override protected boolean swapEnabled() {
- return true;
- }
-
/**
* @throws Exception If failed.
*/
@@ -315,20 +305,20 @@ public abstract class IgniteCachePeekModesAbstractTest extends IgniteCacheAbstra
assertEquals(100, swapKeys.size() + offheapKeys.size() + heapKeys.size());
for (Integer key : swapKeys) {
- assertEquals(val, cache0.localPeek(key, SWAP));
- assertEquals(val, cache0.localPeek(key, PRIMARY, SWAP));
- assertEquals(val, cache0.localPeek(key, ONHEAP, SWAP));
- assertEquals(val, cache0.localPeek(key, ONHEAP, OFFHEAP, SWAP));
- assertEquals(val, cache0.localPeek(key, PRIMARY, ONHEAP, SWAP));
- assertEquals(val, cache0.localPeek(key, PRIMARY, ONHEAP, OFFHEAP, SWAP));
+ assertEquals(val, cache0.localPeek(key));
+ assertEquals(val, cache0.localPeek(key, PRIMARY));
+ assertEquals(val, cache0.localPeek(key, ONHEAP));
+ assertEquals(val, cache0.localPeek(key, ONHEAP, OFFHEAP));
+ assertEquals(val, cache0.localPeek(key, PRIMARY, ONHEAP));
+ assertEquals(val, cache0.localPeek(key, PRIMARY, ONHEAP, OFFHEAP));
if (cacheMode() == LOCAL) {
- assertEquals(val, cache0.localPeek(key, SWAP, BACKUP));
- assertEquals(val, cache0.localPeek(key, SWAP, NEAR));
+ assertEquals(val, cache0.localPeek(key, BACKUP));
+ assertEquals(val, cache0.localPeek(key, NEAR));
}
else {
- assertNull(cache0.localPeek(key, SWAP, BACKUP));
- assertNull(cache0.localPeek(key, SWAP, NEAR));
+ assertNull(cache0.localPeek(key, BACKUP));
+ assertNull(cache0.localPeek(key, NEAR));
}
assertNull(cache0.localPeek(key, ONHEAP));
@@ -338,7 +328,7 @@ public abstract class IgniteCachePeekModesAbstractTest extends IgniteCacheAbstra
for (Integer key : offheapKeys) {
assertEquals(val, cache0.localPeek(key, OFFHEAP));
assertEquals(val, cache0.localPeek(key, ONHEAP, OFFHEAP));
- assertEquals(val, cache0.localPeek(key, ONHEAP, SWAP, OFFHEAP));
+ assertEquals(val, cache0.localPeek(key, ONHEAP, OFFHEAP));
assertEquals(val, cache0.localPeek(key, PRIMARY, OFFHEAP));
if (cacheMode() == LOCAL) {
@@ -351,13 +341,13 @@ public abstract class IgniteCachePeekModesAbstractTest extends IgniteCacheAbstra
}
assertNull(cache0.localPeek(key, ONHEAP));
- assertNull(cache0.localPeek(key, SWAP));
+ assertNull(cache0.localPeek(key));
}
for (Integer key : heapKeys) {
assertEquals(val, cache0.localPeek(key, ONHEAP));
- assertEquals(val, cache0.localPeek(key, SWAP, ONHEAP));
- assertEquals(val, cache0.localPeek(key, SWAP, OFFHEAP, ONHEAP));
+ assertEquals(val, cache0.localPeek(key, ONHEAP));
+ assertEquals(val, cache0.localPeek(key, OFFHEAP, ONHEAP));
assertEquals(val, cache0.localPeek(key, PRIMARY, ONHEAP));
if (cacheMode() == LOCAL) {
@@ -369,7 +359,7 @@ public abstract class IgniteCachePeekModesAbstractTest extends IgniteCacheAbstra
assertNull(cache0.localPeek(key, ONHEAP, NEAR));
}
- assertNull(cache0.localPeek(key, SWAP));
+ assertNull(cache0.localPeek(key));
assertNull(cache0.localPeek(key, OFFHEAP));
}
}
@@ -582,19 +572,19 @@ public abstract class IgniteCachePeekModesAbstractTest extends IgniteCacheAbstra
assertEquals(totalKeys, cache0.localSizeLong(part, ALL));
assertEquals(totalOffheap, cache0.localSizeLong(part, OFFHEAP));
- assertEquals(totalSwap, cache0.localSizeLong(part, SWAP));
+ assertEquals(totalSwap, cache0.localSizeLong(part));
assertEquals(totalKeys - (totalSwap + totalOffheap), cache0.localSizeLong(part, ONHEAP));
assertEquals(totalOffheap, cache0.sizeLong(part, OFFHEAP));
- assertEquals(totalSwap, cache0.sizeLong(part, SWAP));
+ assertEquals(totalSwap, cache0.sizeLong(part));
assertEquals(totalKeys - (totalSwap + totalOffheap), cache0.sizeLong(part, ONHEAP));
assertEquals(totalOffheap, cache0.localSizeLong(part, OFFHEAP, PRIMARY));
- assertEquals(totalSwap, cache0.localSizeLong(part, SWAP, PRIMARY));
+ assertEquals(totalSwap, cache0.localSizeLong(part, PRIMARY));
assertEquals(totalKeys - (totalSwap + totalOffheap), cache0.localSizeLong(part, ONHEAP, PRIMARY));
assertEquals(totalOffheap, cache0.localSizeLong(part, OFFHEAP, BACKUP));
- assertEquals(totalSwap, cache0.localSizeLong(part, SWAP, BACKUP));
+ assertEquals(totalSwap, cache0.localSizeLong(part, BACKUP));
assertEquals(totalKeys - (totalSwap + totalOffheap), cache0.localSizeLong(part, ONHEAP, BACKUP));
}
finally {
@@ -918,9 +908,6 @@ public abstract class IgniteCachePeekModesAbstractTest extends IgniteCacheAbstra
assertEquals(0, cache.size());
for (CachePeekMode peekMode : CachePeekMode.values()) {
- if (peekMode == SWAP)
- continue;
-
assertEquals(0, cache.localSize(peekMode));
assertEquals(0, cache.size(peekMode));
@@ -1093,20 +1080,20 @@ public abstract class IgniteCachePeekModesAbstractTest extends IgniteCacheAbstra
assertEquals(primaryKeys.size(), cache0.localSize());
assertEquals(totalKeys, cache0.localSize(ALL));
assertEquals(totalOffheap, cache0.localSize(PRIMARY, BACKUP, NEAR, OFFHEAP));
- assertEquals(totalSwap, cache0.localSize(PRIMARY, BACKUP, NEAR, SWAP));
+ assertEquals(totalSwap, cache0.localSize(PRIMARY, BACKUP, NEAR));
assertEquals(totalKeys - (totalOffheap + totalSwap), cache0.localSize(PRIMARY, BACKUP, NEAR, ONHEAP));
- assertEquals(totalKeys, cache0.localSize(PRIMARY, BACKUP, NEAR, SWAP, OFFHEAP, ONHEAP));
+ assertEquals(totalKeys, cache0.localSize(PRIMARY, BACKUP, NEAR, OFFHEAP, ONHEAP));
- assertEquals(swapKeys.get1(), (Integer)cache0.localSize(SWAP, PRIMARY));
- assertEquals(swapKeys.get2(), (Integer)cache0.localSize(SWAP, BACKUP));
+ assertEquals(swapKeys.get1(), (Integer)cache0.localSize(PRIMARY));
+ assertEquals(swapKeys.get2(), (Integer)cache0.localSize(BACKUP));
assertEquals(offheapKeys.get1(), (Integer)cache0.localSize(OFFHEAP, PRIMARY));
assertEquals(offheapKeys.get2(), (Integer)cache0.localSize(OFFHEAP, BACKUP));
- assertEquals(swapKeys.get1() + offheapKeys.get1(), cache0.localSize(SWAP, OFFHEAP, PRIMARY));
- assertEquals(swapKeys.get2() + offheapKeys.get2(), cache0.localSize(SWAP, OFFHEAP, BACKUP));
+ assertEquals(swapKeys.get1() + offheapKeys.get1(), cache0.localSize(OFFHEAP, PRIMARY));
+ assertEquals(swapKeys.get2() + offheapKeys.get2(), cache0.localSize(OFFHEAP, BACKUP));
- assertEquals(totalSwap + totalOffheap, cache0.localSize(PRIMARY, BACKUP, NEAR, SWAP, OFFHEAP));
+ assertEquals(totalSwap + totalOffheap, cache0.localSize(PRIMARY, BACKUP, NEAR, OFFHEAP));
int globalSwapPrimary = 0;
int globalSwapBackup = 0;
@@ -1148,20 +1135,20 @@ public abstract class IgniteCachePeekModesAbstractTest extends IgniteCacheAbstra
assertEquals(totalKeys, cache.size(PRIMARY));
assertEquals(globalTotal, cache.size(ALL));
- assertEquals(globalTotal, cache.size(PRIMARY, BACKUP, NEAR, ONHEAP, OFFHEAP, SWAP));
- assertEquals(globalTotal, cache.size(ONHEAP, OFFHEAP, SWAP, PRIMARY, BACKUP));
+ assertEquals(globalTotal, cache.size(PRIMARY, BACKUP, NEAR, ONHEAP, OFFHEAP));
+ assertEquals(globalTotal, cache.size(ONHEAP, OFFHEAP, PRIMARY, BACKUP));
- assertEquals(globalTotalSwap, cache.size(PRIMARY, BACKUP, NEAR, SWAP));
- assertEquals(globalSwapPrimary, cache.size(SWAP, PRIMARY));
- assertEquals(globalSwapBackup, cache.size(SWAP, BACKUP));
+ assertEquals(globalTotalSwap, cache.size(PRIMARY, BACKUP, NEAR));
+ assertEquals(globalSwapPrimary, cache.size(PRIMARY));
+ assertEquals(globalSwapBackup, cache.size(BACKUP));
assertEquals(globalTotalOffheap, cache.size(PRIMARY, BACKUP, NEAR, OFFHEAP));
assertEquals(globalOffheapPrimary, cache.size(OFFHEAP, PRIMARY));
assertEquals(globalOffheapBackup, cache.size(OFFHEAP, BACKUP));
- assertEquals(globalTotalSwap + globalTotalOffheap, cache.size(PRIMARY, BACKUP, NEAR, SWAP, OFFHEAP));
- assertEquals(globalSwapPrimary + globalOffheapPrimary, cache.size(SWAP, OFFHEAP, PRIMARY));
- assertEquals(globalSwapBackup + globalOffheapBackup, cache.size(SWAP, OFFHEAP, BACKUP));
+ assertEquals(globalTotalSwap + globalTotalOffheap, cache.size(PRIMARY, BACKUP, NEAR, OFFHEAP));
+ assertEquals(globalSwapPrimary + globalOffheapPrimary, cache.size(OFFHEAP, PRIMARY));
+ assertEquals(globalSwapBackup + globalOffheapBackup, cache.size(OFFHEAP, BACKUP));
assertEquals(globalTotal - (globalTotalOffheap + globalTotalSwap), cache.size(PRIMARY, BACKUP, NEAR, ONHEAP));
}
@@ -1247,20 +1234,20 @@ public abstract class IgniteCachePeekModesAbstractTest extends IgniteCacheAbstra
assertEquals(totalKeys, cache.size(PRIMARY));
assertEquals(globalTotal, cache.size(ALL));
- assertEquals(globalTotal, cache.size(PRIMARY, BACKUP, NEAR, ONHEAP, OFFHEAP, SWAP));
- assertEquals(globalTotal, cache.size(ONHEAP, OFFHEAP, SWAP, PRIMARY, BACKUP));
+ assertEquals(globalTotal, cache.size(PRIMARY, BACKUP, NEAR, ONHEAP, OFFHEAP));
+ assertEquals(globalTotal, cache.size(ONHEAP, OFFHEAP, PRIMARY, BACKUP));
- assertEquals(globalPartTotalSwap, cache.sizeLong(part, PRIMARY, BACKUP, NEAR, SWAP));
- assertEquals(globalParitionSwapPrimary, cache.sizeLong(part, SWAP, PRIMARY));
- assertEquals(globalPartSwapBackup, cache.sizeLong(part, SWAP, BACKUP));
+ assertEquals(globalPartTotalSwap, cache.sizeLong(part, PRIMARY, BACKUP, NEAR));
+ assertEquals(globalParitionSwapPrimary, cache.sizeLong(part, PRIMARY));
+ assertEquals(globalPartSwapBackup, cache.sizeLong(part, BACKUP));
assertEquals(globalPartTotalOffheap, cache.sizeLong(part, PRIMARY, BACKUP, NEAR, OFFHEAP));
assertEquals(globalPartOffheapPrimary, cache.sizeLong(part, OFFHEAP, PRIMARY));
assertEquals(globalPartOffheapBackup, cache.sizeLong(part, OFFHEAP, BACKUP));
- assertEquals(globalPartTotalSwap + globalPartTotalOffheap, cache.sizeLong(part, PRIMARY, BACKUP, NEAR, SWAP, OFFHEAP));
- assertEquals(globalParitionSwapPrimary + globalPartOffheapPrimary, cache.sizeLong(part, SWAP, OFFHEAP, PRIMARY));
- assertEquals(globalPartSwapBackup + globalPartOffheapBackup, cache.sizeLong(part, SWAP, OFFHEAP, BACKUP));
+ assertEquals(globalPartTotalSwap + globalPartTotalOffheap, cache.sizeLong(part, PRIMARY, BACKUP, NEAR, OFFHEAP));
+ assertEquals(globalParitionSwapPrimary + globalPartOffheapPrimary, cache.sizeLong(part, OFFHEAP, PRIMARY));
+ assertEquals(globalPartSwapBackup + globalPartOffheapBackup, cache.sizeLong(part, OFFHEAP, BACKUP));
}
}
finally {
@@ -1458,23 +1445,23 @@ public abstract class IgniteCachePeekModesAbstractTest extends IgniteCacheAbstra
checkLocalEntries(cache0.localEntries(), val, primaryKeys, backupKeys);
checkLocalEntries(cache0.localEntries(ALL), val, primaryKeys, backupKeys);
- checkLocalEntries(cache0.localEntries(ONHEAP, OFFHEAP, SWAP), val, primaryKeys, backupKeys);
+ checkLocalEntries(cache0.localEntries(ONHEAP, OFFHEAP), val, primaryKeys, backupKeys);
- checkLocalEntries(cache0.localEntries(SWAP), val, swap);
+ checkLocalEntries(cache0.localEntries(), val, swap);
checkLocalEntries(cache0.localEntries(OFFHEAP), val, offheap);
checkLocalEntries(cache0.localEntries(ONHEAP), val, heap);
- checkLocalEntries(cache0.localEntries(SWAP, OFFHEAP), val, swap, offheap);
- checkLocalEntries(cache0.localEntries(SWAP, ONHEAP), val, swap, heap);
+ checkLocalEntries(cache0.localEntries(OFFHEAP), val, swap, offheap);
+ checkLocalEntries(cache0.localEntries(ONHEAP), val, swap, heap);
- checkLocalEntries(cache0.localEntries(SWAP, PRIMARY), val, swapKeys.get1());
- checkLocalEntries(cache0.localEntries(SWAP, BACKUP), val, swapKeys.get2());
+ checkLocalEntries(cache0.localEntries(PRIMARY), val, swapKeys.get1());
+ checkLocalEntries(cache0.localEntries(BACKUP), val, swapKeys.get2());
checkLocalEntries(cache0.localEntries(OFFHEAP, PRIMARY), val, offheapKeys.get1());
checkLocalEntries(cache0.localEntries(OFFHEAP, BACKUP), val, offheapKeys.get2());
- checkLocalEntries(cache0.localEntries(SWAP, OFFHEAP, PRIMARY), val, swapKeys.get1(), offheapKeys.get1());
- checkLocalEntries(cache0.localEntries(SWAP, OFFHEAP, BACKUP), val, swapKeys.get2(), offheapKeys.get2());
- checkLocalEntries(cache0.localEntries(SWAP, OFFHEAP, PRIMARY, BACKUP), val, swap, offheap);
+ checkLocalEntries(cache0.localEntries(OFFHEAP, PRIMARY), val, swapKeys.get1(), offheapKeys.get1());
+ checkLocalEntries(cache0.localEntries(OFFHEAP, BACKUP), val, swapKeys.get2(), offheapKeys.get2());
+ checkLocalEntries(cache0.localEntries(OFFHEAP, PRIMARY, BACKUP), val, swap, offheap);
}
finally {
cache0.removeAll(new HashSet<>(primaryKeys));
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheReadThroughEvictionSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheReadThroughEvictionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheReadThroughEvictionSelfTest.java
index c1a2148..00431b1 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheReadThroughEvictionSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheReadThroughEvictionSelfTest.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.IgniteCheckedException;
-import org.apache.ignite.cache.CacheMemoryMode;
import org.apache.ignite.cache.CachePeekMode;
import org.apache.ignite.cache.eviction.fifo.FifoEvictionPolicy;
import org.apache.ignite.configuration.CacheConfiguration;
@@ -148,18 +147,15 @@ public class IgniteCacheReadThroughEvictionSelfTest extends IgniteCacheConfigVar
}
/**
- * // TODO GG-11140: enable when eviction is implemented.
* @throws Exception if failed.
*/
- public void _testReadThroughEvictionPolicy() throws Exception {
+ public void testReadThroughEvictionPolicy() throws Exception {
Ignite ig = testedGrid();
CacheConfiguration<Object, Object> cc = variationConfig("eviction");
cc.setEvictionPolicy(new FifoEvictionPolicy(1));
-
- if (cc.getMemoryMode() == CacheMemoryMode.OFFHEAP_TIERED)
- cc.setOffHeapMaxMemory(2 * 1024);
+ cc.setOnheapCacheEnabled(true);
final IgniteCache<Object, Object> cache = ig.createCache(cc);
@@ -174,7 +170,7 @@ public class IgniteCacheReadThroughEvictionSelfTest extends IgniteCacheConfigVar
System.out.println("Cache [onHeap=" + size + ", offHeap=" + offheapSize + ']');
- return size <= testsCfg.gridCount() && offheapSize < KEYS;
+ return size <= testsCfg.gridCount();
}
}, 30_000));
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheStoreValueAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheStoreValueAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheStoreValueAbstractTest.java
index a6601b2..3a55f47 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheStoreValueAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheStoreValueAbstractTest.java
@@ -101,11 +101,6 @@ public abstract class IgniteCacheStoreValueAbstractTest extends IgniteCacheAbstr
}
/** {@inheritDoc} */
- @Override protected boolean swapEnabled() {
- return true;
- }
-
- /** {@inheritDoc} */
@Override protected long getTestTimeout() {
return 3 * 60_000;
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxNearPeekModesTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxNearPeekModesTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxNearPeekModesTest.java
index c32052b..aa4faaf 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxNearPeekModesTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxNearPeekModesTest.java
@@ -28,6 +28,9 @@ public class IgniteCacheTxNearPeekModesTest extends IgniteCacheTxPeekModesTest {
/** {@inheritDoc} */
@Override public void testLocalPeek() throws Exception {
- fail("https://issues.apache.org/jira/browse/IGNITE-1824");
+ // TODO: uncomment and re-open ticket if fails.
+// fail("https://issues.apache.org/jira/browse/IGNITE-1824");
+
+ super.testLocalPeek();
}
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxPeekModesTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxPeekModesTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxPeekModesTest.java
index f399ca2..61839b5 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxPeekModesTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxPeekModesTest.java
@@ -51,6 +51,9 @@ public class IgniteCacheTxPeekModesTest extends IgniteCachePeekModesAbstractTest
/** {@inheritDoc} */
@Override public void testLocalPeek() throws Exception {
- fail("https://issues.apache.org/jira/browse/IGNITE-1839");
+ // TODO: uncomment and re-open ticket if fails.
+// fail("https://issues.apache.org/jira/browse/IGNITE-1824");
+
+ super.testLocalPeek();
}
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/OffHeapTieredTransactionSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/OffHeapTieredTransactionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/OffHeapTieredTransactionSelfTest.java
deleted file mode 100644
index 7f38bb2..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/OffHeapTieredTransactionSelfTest.java
+++ /dev/null
@@ -1,134 +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.LinkedHashMap;
-import java.util.Map;
-import org.apache.ignite.Ignite;
-import org.apache.ignite.IgniteCache;
-import org.apache.ignite.IgniteTransactions;
-import org.apache.ignite.configuration.CacheConfiguration;
-import org.apache.ignite.configuration.IgniteConfiguration;
-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.junits.common.GridCommonAbstractTest;
-import org.apache.ignite.transactions.Transaction;
-import org.apache.ignite.transactions.TransactionConcurrency;
-import org.apache.ignite.transactions.TransactionIsolation;
-
-import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
-import static org.apache.ignite.cache.CacheMode.REPLICATED;
-import static org.apache.ignite.transactions.TransactionConcurrency.OPTIMISTIC;
-import static org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC;
-import static org.apache.ignite.transactions.TransactionIsolation.READ_COMMITTED;
-import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_READ;
-import static org.apache.ignite.transactions.TransactionIsolation.SERIALIZABLE;
-
-/**
- * Off-heap tiered test.
- */
-public class OffHeapTieredTransactionSelfTest extends GridCommonAbstractTest {
- /** IP finder. */
- private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true);
-
- /** {@inheritDoc} */
- @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
- IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
-
- CacheConfiguration ccfg = defaultCacheConfiguration();
-
- ccfg.setMemoryMode(OFFHEAP_TIERED);
- ccfg.setAtomicityMode(TRANSACTIONAL);
- ccfg.setOffHeapMaxMemory(0);
- ccfg.setCacheMode(REPLICATED);
-
- TcpDiscoverySpi disco = new TcpDiscoverySpi();
-
- disco.setIpFinder(ipFinder);
-
- cfg.setDiscoverySpi(disco);
-
- cfg.setCacheConfiguration(ccfg);
-
- cfg.getTransactionConfiguration().setTxSerializableEnabled(true);
-
- return cfg;
- }
-
- /** {@inheritDoc} */
- @Override protected long getTestTimeout() {
- return 30_000;
- }
-
- /** {@inheritDoc} */
- @Override protected void beforeTest() throws Exception {
- startGrids(2);
-
- awaitPartitionMapExchange();
- }
-
- /** {@inheritDoc} */
- @Override protected void afterTest() throws Exception {
- stopAllGrids();
- }
-
- /**
- * @throws Exception In case of error.
- */
- public void testPutAll() throws Exception {
- IgniteCache<String, Integer> cache = grid(0).cache(null);
-
- final int KEYS = 5;
-
- Map<String, Integer> data = new LinkedHashMap<>();
-
- for (int i = 0; i < KEYS; i++)
- data.put("key_" + i, i);
-
- checkPutAll(cache, data, OPTIMISTIC, READ_COMMITTED);
-
- checkPutAll(cache, data, OPTIMISTIC, REPEATABLE_READ);
-
- checkPutAll(cache, data, OPTIMISTIC, SERIALIZABLE);
-
- checkPutAll(cache, data, PESSIMISTIC, READ_COMMITTED);
-
- checkPutAll(cache, data, PESSIMISTIC, REPEATABLE_READ);
-
- checkPutAll(cache, data, PESSIMISTIC, SERIALIZABLE);
- }
-
- /**
- * @throws Exception In case of error.
- */
- private void checkPutAll(IgniteCache<String, Integer> cache, Map<String, Integer> data,
- TransactionConcurrency txConcurrency, TransactionIsolation txIsolation) throws Exception {
- IgniteTransactions txs = cache.unwrap(Ignite.class).transactions();
-
- try (Transaction tx = txs.txStart(txConcurrency, txIsolation)) {
- cache.putAll(data);
-
- tx.commit();
- }
-
- for (Map.Entry<String, Integer> entry : data.entrySet())
- assertEquals(entry.getValue(), cache.get(entry.getKey()));
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/OffheapCacheMetricsForClusterGroupSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/OffheapCacheMetricsForClusterGroupSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/OffheapCacheMetricsForClusterGroupSelfTest.java
index 7896e3e..a3d3130 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/OffheapCacheMetricsForClusterGroupSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/OffheapCacheMetricsForClusterGroupSelfTest.java
@@ -18,7 +18,6 @@
package org.apache.ignite.internal.processors.cache;
import org.apache.ignite.IgniteCache;
-import org.apache.ignite.cache.CacheMemoryMode;
import org.apache.ignite.configuration.CacheConfiguration;
import org.apache.ignite.configuration.IgniteConfiguration;
import org.apache.ignite.events.Event;
@@ -134,8 +133,6 @@ public class OffheapCacheMetricsForClusterGroupSelfTest extends GridCommonAbstra
cfg.setBackups(1);
cfg.setStatisticsEnabled(true);
- cfg.setMemoryMode(CacheMemoryMode.OFFHEAP_TIERED);
- cfg.setOffHeapMaxMemory(1024 * 1024 * 1024);
return cfg;
}
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectsAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectsAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectsAbstractSelfTest.java
index 134ed68..a327dcb 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectsAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectsAbstractSelfTest.java
@@ -78,7 +78,6 @@ import org.apache.ignite.transactions.TransactionIsolation;
import org.jetbrains.annotations.Nullable;
import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
import static org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC;
import static org.apache.ignite.transactions.TransactionIsolation.READ_COMMITTED;
@@ -156,22 +155,11 @@ public abstract class GridCacheBinaryObjectsAbstractSelfTest extends GridCommonA
cacheCfg.setWriteThrough(true);
cacheCfg.setLoadPreviousValue(true);
cacheCfg.setBackups(1);
-
- if (offheapTiered()) {
- cacheCfg.setMemoryMode(OFFHEAP_TIERED);
- cacheCfg.setOffHeapMaxMemory(0);
- }
+ cacheCfg.setOnheapCacheEnabled(false);
return cacheCfg;
}
- /**
- * @return {@code True} if should use OFFHEAP_TIERED mode.
- */
- protected boolean offheapTiered() {
- return false;
- }
-
/** {@inheritDoc} */
@Override protected void beforeTestsStarted() throws Exception {
startGridsMultiThreaded(gridCount());
@@ -204,11 +192,6 @@ public abstract class GridCacheBinaryObjectsAbstractSelfTest extends GridCommonA
for (int i = 0; i < ENTRY_CNT; i++)
c.remove(i);
- if (offheapTiered()) {
- for (int k = 0; k < 100; k++)
- c.remove(k);
- }
-
assertEquals(0, c.size());
}
@@ -233,6 +216,13 @@ public abstract class GridCacheBinaryObjectsAbstractSelfTest extends GridCommonA
protected abstract int gridCount();
/**
+ * @return {@code True} if on-heap cache is enabled.
+ */
+ protected boolean onheapCacheEnabled() {
+ return false;
+ }
+
+ /**
* @throws Exception If failed.
*/
@SuppressWarnings("unchecked")
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheBinaryObjectsAtomicNearDisabledOffheapTieredSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheBinaryObjectsAtomicNearDisabledOffheapTieredSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheBinaryObjectsAtomicNearDisabledOffheapTieredSelfTest.java
deleted file mode 100644
index 39c35a2..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheBinaryObjectsAtomicNearDisabledOffheapTieredSelfTest.java
+++ /dev/null
@@ -1,29 +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.binary.distributed.dht;
-
-/**
- *
- */
-public class GridCacheBinaryObjectsAtomicNearDisabledOffheapTieredSelfTest
- extends GridCacheBinaryObjectsAtomicNearDisabledSelfTest {
- /** {@inheritDoc} */
- @Override protected boolean offheapTiered() {
- return true;
- }
-}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheBinaryObjectsAtomicNearDisabledOnheapSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheBinaryObjectsAtomicNearDisabledOnheapSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheBinaryObjectsAtomicNearDisabledOnheapSelfTest.java
new file mode 100644
index 0000000..9e690ae
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheBinaryObjectsAtomicNearDisabledOnheapSelfTest.java
@@ -0,0 +1,8 @@
+package org.apache.ignite.internal.processors.cache.binary.distributed.dht;
+
+public class GridCacheBinaryObjectsAtomicNearDisabledOnheapSelfTest extends GridCacheBinaryObjectsAtomicNearDisabledSelfTest {
+ /** {@inheritDoc} */
+ @Override protected boolean onheapCacheEnabled() {
+ return true;
+ }
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheBinaryObjectsAtomicOffheapTieredSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheBinaryObjectsAtomicOffheapTieredSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheBinaryObjectsAtomicOffheapTieredSelfTest.java
deleted file mode 100644
index e6ae410..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheBinaryObjectsAtomicOffheapTieredSelfTest.java
+++ /dev/null
@@ -1,29 +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.binary.distributed.dht;
-
-/**
- *
- */
-public class GridCacheBinaryObjectsAtomicOffheapTieredSelfTest extends GridCacheBinaryObjectsAtomicSelfTest {
- /** {@inheritDoc} */
- @Override protected boolean offheapTiered() {
- return true;
- }
-}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheBinaryObjectsAtomicOnheapSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheBinaryObjectsAtomicOnheapSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheBinaryObjectsAtomicOnheapSelfTest.java
new file mode 100644
index 0000000..ad264cb
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheBinaryObjectsAtomicOnheapSelfTest.java
@@ -0,0 +1,8 @@
+package org.apache.ignite.internal.processors.cache.binary.distributed.dht;
+
+public class GridCacheBinaryObjectsAtomicOnheapSelfTest extends GridCacheBinaryObjectsAtomicSelfTest {
+ /** {@inheritDoc} */
+ @Override protected boolean onheapCacheEnabled() {
+ return true;
+ }
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheBinaryObjectsPartitionedNearDisabledOffheapTieredSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheBinaryObjectsPartitionedNearDisabledOffheapTieredSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheBinaryObjectsPartitionedNearDisabledOffheapTieredSelfTest.java
deleted file mode 100644
index 8aa082e..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheBinaryObjectsPartitionedNearDisabledOffheapTieredSelfTest.java
+++ /dev/null
@@ -1,30 +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.binary.distributed.dht;
-
-/**
- *
- */
-public class GridCacheBinaryObjectsPartitionedNearDisabledOffheapTieredSelfTest
- extends GridCacheBinaryObjectsPartitionedNearDisabledSelfTest {
- /** {@inheritDoc} */
- @Override protected boolean offheapTiered() {
- return true;
- }
-}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheBinaryObjectsPartitionedNearDisabledOnheapSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheBinaryObjectsPartitionedNearDisabledOnheapSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheBinaryObjectsPartitionedNearDisabledOnheapSelfTest.java
new file mode 100644
index 0000000..ad9bda8
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheBinaryObjectsPartitionedNearDisabledOnheapSelfTest.java
@@ -0,0 +1,8 @@
+package org.apache.ignite.internal.processors.cache.binary.distributed.dht;
+
+public class GridCacheBinaryObjectsPartitionedNearDisabledOnheapSelfTest extends GridCacheBinaryObjectsPartitionedNearDisabledSelfTest {
+ /** {@inheritDoc} */
+ @Override protected boolean onheapCacheEnabled() {
+ return true;
+ }
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheBinaryObjectsPartitionedOffheapTieredSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheBinaryObjectsPartitionedOffheapTieredSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheBinaryObjectsPartitionedOffheapTieredSelfTest.java
deleted file mode 100644
index 7db608d..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheBinaryObjectsPartitionedOffheapTieredSelfTest.java
+++ /dev/null
@@ -1,30 +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.binary.distributed.dht;
-
-/**
- *
- */
-public class GridCacheBinaryObjectsPartitionedOffheapTieredSelfTest
- extends GridCacheBinaryObjectsPartitionedSelfTest {
- /** {@inheritDoc} */
- @Override protected boolean offheapTiered() {
- return true;
- }
-}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheBinaryObjectsPartitionedOnheapSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheBinaryObjectsPartitionedOnheapSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheBinaryObjectsPartitionedOnheapSelfTest.java
new file mode 100644
index 0000000..af2afd0
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheBinaryObjectsPartitionedOnheapSelfTest.java
@@ -0,0 +1,8 @@
+package org.apache.ignite.internal.processors.cache.binary.distributed.dht;
+
+public class GridCacheBinaryObjectsPartitionedOnheapSelfTest extends GridCacheBinaryObjectsPartitionedSelfTest {
+ /** {@inheritDoc} */
+ @Override protected boolean onheapCacheEnabled() {
+ return true;
+ }
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheMemoryModeBinarySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheMemoryModeBinarySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheMemoryModeBinarySelfTest.java
deleted file mode 100644
index 6427969..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheMemoryModeBinarySelfTest.java
+++ /dev/null
@@ -1,36 +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.binary.distributed.dht;
-
-import org.apache.ignite.configuration.IgniteConfiguration;
-import org.apache.ignite.internal.processors.cache.GridCacheMemoryModeSelfTest;
-import org.apache.ignite.internal.binary.BinaryMarshaller;
-
-/**
- * Memory models test.
- */
-public class GridCacheMemoryModeBinarySelfTest extends GridCacheMemoryModeSelfTest {
- /** {@inheritDoc} */
- @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
- IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
-
- cfg.setMarshaller(new BinaryMarshaller());
-
- return cfg;
- }
-}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheOffHeapTieredAtomicBinarySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheOffHeapTieredAtomicBinarySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheOffHeapTieredAtomicBinarySelfTest.java
deleted file mode 100644
index 14a9123..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheOffHeapTieredAtomicBinarySelfTest.java
+++ /dev/null
@@ -1,48 +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.binary.distributed.dht;
-
-import java.util.Arrays;
-import org.apache.ignite.configuration.BinaryConfiguration;
-import org.apache.ignite.configuration.IgniteConfiguration;
-import org.apache.ignite.internal.processors.cache.GridCacheOffHeapTieredAtomicSelfTest;
-import org.apache.ignite.internal.binary.BinaryMarshaller;
-
-/**
- *
- */
-public class GridCacheOffHeapTieredAtomicBinarySelfTest extends GridCacheOffHeapTieredAtomicSelfTest {
- /** {@inheritDoc} */
- @Override protected boolean binaryEnabled() {
- return true;
- }
-
- /** {@inheritDoc} */
- @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
- // Enable binary.
- IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
-
- BinaryConfiguration bCfg = new BinaryConfiguration();
-
- bCfg.setClassNames(Arrays.asList(TestValue.class.getName()));
-
- cfg.setMarshaller(new BinaryMarshaller());
-
- return cfg;
- }
-}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheOffHeapTieredBinarySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheOffHeapTieredBinarySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheOffHeapTieredBinarySelfTest.java
deleted file mode 100644
index 00a6b10..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheOffHeapTieredBinarySelfTest.java
+++ /dev/null
@@ -1,48 +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.binary.distributed.dht;
-
-import java.util.Arrays;
-import org.apache.ignite.configuration.BinaryConfiguration;
-import org.apache.ignite.configuration.IgniteConfiguration;
-import org.apache.ignite.internal.processors.cache.GridCacheOffHeapTieredSelfTest;
-import org.apache.ignite.internal.binary.BinaryMarshaller;
-
-/**
- *
- */
-public class GridCacheOffHeapTieredBinarySelfTest extends GridCacheOffHeapTieredSelfTest {
- /** {@inheritDoc} */
- @Override protected boolean binaryEnabled() {
- return true;
- }
-
- /** {@inheritDoc} */
- @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
- // Enable binary.
- IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
-
- BinaryConfiguration bCfg = new BinaryConfiguration();
-
- bCfg.setClassNames(Arrays.asList(TestValue.class.getName()));
-
- cfg.setMarshaller(new BinaryMarshaller());
-
- return cfg;
- }
-}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheOffHeapTieredEvictionAtomicBinarySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheOffHeapTieredEvictionAtomicBinarySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheOffHeapTieredEvictionAtomicBinarySelfTest.java
deleted file mode 100644
index 956300c..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheOffHeapTieredEvictionAtomicBinarySelfTest.java
+++ /dev/null
@@ -1,96 +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.binary.distributed.dht;
-
-import java.util.Arrays;
-import org.apache.ignite.configuration.BinaryConfiguration;
-import org.apache.ignite.configuration.IgniteConfiguration;
-import org.apache.ignite.internal.processors.cache.GridCacheOffHeapTieredEvictionAtomicSelfTest;
-import org.apache.ignite.internal.binary.BinaryMarshaller;
-import org.apache.ignite.binary.BinaryObject;
-
-/**
- *
- */
-public class GridCacheOffHeapTieredEvictionAtomicBinarySelfTest extends GridCacheOffHeapTieredEvictionAtomicSelfTest {
- /** {@inheritDoc} */
- @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
- // Enable binary.
- IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
-
- BinaryConfiguration bCfg = new BinaryConfiguration();
-
- bCfg.setClassNames(Arrays.asList(TestValue.class.getName()));
-
- cfg.setMarshaller(new BinaryMarshaller());
-
- return cfg;
- }
-
- /** {@inheritDoc} */
- @Override protected TestPredicate testPredicate(String expVal, boolean acceptNull) {
- return new BinaryValuePredicate(expVal, acceptNull);
- }
-
- /** {@inheritDoc} */
- @Override protected TestProcessor testClosure(String expVal, boolean acceptNull) {
- return new BinaryValueClosure(expVal, acceptNull);
- }
-
- /**
- *
- */
- @SuppressWarnings("PackageVisibleInnerClass")
- static class BinaryValuePredicate extends TestPredicate {
- /**
- * @param expVal Expected value.
- * @param acceptNull If {@code true} value can be null;
- */
- BinaryValuePredicate(String expVal, boolean acceptNull) {
- super(expVal, acceptNull);
- }
-
- /** {@inheritDoc} */
- @Override public void checkValue(Object val) {
- BinaryObject obj = (BinaryObject)val;
-
- assertEquals(expVal, obj.field("val"));
- }
- }
-
- /**
- *
- */
- @SuppressWarnings("PackageVisibleInnerClass")
- static class BinaryValueClosure extends TestProcessor {
- /**
- * @param expVal Expected value.
- * @param acceptNull If {@code true} value can be null;
- */
- BinaryValueClosure(String expVal, boolean acceptNull) {
- super(expVal, acceptNull);
- }
-
- /** {@inheritDoc} */
- @Override public void checkValue(Object val) {
- BinaryObject obj = (BinaryObject)val;
-
- assertEquals(expVal, obj.field("val"));
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheOffHeapTieredEvictionBinarySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheOffHeapTieredEvictionBinarySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheOffHeapTieredEvictionBinarySelfTest.java
deleted file mode 100644
index b0fc62c..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheOffHeapTieredEvictionBinarySelfTest.java
+++ /dev/null
@@ -1,96 +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.binary.distributed.dht;
-
-import java.util.Arrays;
-import org.apache.ignite.configuration.BinaryConfiguration;
-import org.apache.ignite.configuration.IgniteConfiguration;
-import org.apache.ignite.internal.processors.cache.GridCacheOffHeapTieredEvictionSelfTest;
-import org.apache.ignite.internal.binary.BinaryMarshaller;
-import org.apache.ignite.binary.BinaryObject;
-
-/**
- *
- */
-public class GridCacheOffHeapTieredEvictionBinarySelfTest extends GridCacheOffHeapTieredEvictionSelfTest {
- /** {@inheritDoc} */
- @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
- // Enable binary.
- IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
-
- BinaryConfiguration bCfg = new BinaryConfiguration();
-
- bCfg.setClassNames(Arrays.asList(TestValue.class.getName()));
-
- cfg.setMarshaller(new BinaryMarshaller());
-
- return cfg;
- }
-
- /** {@inheritDoc} */
- @Override protected TestPredicate testPredicate(String expVal, boolean acceptNull) {
- return new BinaryValuePredicate(expVal, acceptNull);
- }
-
- /** {@inheritDoc} */
- @Override protected TestProcessor testClosure(String expVal, boolean acceptNull) {
- return new BinaryValueClosure(expVal, acceptNull);
- }
-
- /**
- *
- */
- @SuppressWarnings("PackageVisibleInnerClass")
- static class BinaryValuePredicate extends TestPredicate {
- /**
- * @param expVal Expected value.
- * @param acceptNull If {@code true} value can be null;
- */
- BinaryValuePredicate(String expVal, boolean acceptNull) {
- super(expVal, acceptNull);
- }
-
- /** {@inheritDoc} */
- @Override public void checkValue(Object val) {
- BinaryObject obj = (BinaryObject)val;
-
- assertEquals(expVal, obj.field("val"));
- }
- }
-
- /**
- *
- */
- @SuppressWarnings("PackageVisibleInnerClass")
- static class BinaryValueClosure extends TestProcessor {
- /**
- * @param expVal Expected value.
- * @param acceptNull If {@code true} value can be null;
- */
- BinaryValueClosure(String expVal, boolean acceptNull) {
- super(expVal, acceptNull);
- }
-
- /** {@inheritDoc} */
- @Override public void checkValue(Object val) {
- BinaryObject obj = (BinaryObject)val;
-
- assertEquals(expVal, obj.field("val"));
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/local/GridCacheBinaryObjectsLocalOffheapTieredSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/local/GridCacheBinaryObjectsLocalOffheapTieredSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/local/GridCacheBinaryObjectsLocalOffheapTieredSelfTest.java
deleted file mode 100644
index d53da63..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/local/GridCacheBinaryObjectsLocalOffheapTieredSelfTest.java
+++ /dev/null
@@ -1,29 +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.binary.local;
-
-/**
- *
- */
-public class GridCacheBinaryObjectsLocalOffheapTieredSelfTest extends GridCacheBinaryObjectsLocalSelfTest {
- /** {@inheritDoc} */
- @Override protected boolean offheapTiered() {
- return true;
- }
-}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/local/GridCacheBinaryObjectsLocalOnheapSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/local/GridCacheBinaryObjectsLocalOnheapSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/local/GridCacheBinaryObjectsLocalOnheapSelfTest.java
new file mode 100644
index 0000000..bb44a4d
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/local/GridCacheBinaryObjectsLocalOnheapSelfTest.java
@@ -0,0 +1,26 @@
+/*
+ * 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.binary.local;
+
+public class GridCacheBinaryObjectsLocalOnheapSelfTest extends GridCacheBinaryObjectsLocalSelfTest {
+ /** {@inheritDoc} */
+ @Override protected boolean onheapCacheEnabled() {
+ return true;
+ }
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueCleanupSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueCleanupSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueCleanupSelfTest.java
index e359ef3..725b226 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueCleanupSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueCleanupSelfTest.java
@@ -23,7 +23,6 @@ import java.util.concurrent.atomic.AtomicBoolean;
import org.apache.ignite.Ignite;
import org.apache.ignite.IgniteQueue;
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.CollectionConfiguration;
@@ -37,7 +36,6 @@ import org.apache.ignite.internal.util.typedef.PAX;
import org.apache.ignite.testframework.GridTestUtils;
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;
/**
@@ -61,11 +59,6 @@ public class GridCacheQueueCleanupSelfTest extends IgniteCollectionAbstractTest
}
/** {@inheritDoc} */
- @Override protected CacheMemoryMode collectionMemoryMode() {
- return ONHEAP_TIERED;
- }
-
- /** {@inheritDoc} */
@Override protected CacheAtomicityMode collectionCacheAtomicityMode() {
return TRANSACTIONAL;
}
[05/17] ignite git commit: IGNITE-4535 - Add option to store
deserialized values on-heap
Posted by ag...@apache.org.
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryRandomOperationsTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryRandomOperationsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryRandomOperationsTest.java
index 172ca56..6d8b4e4 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryRandomOperationsTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryRandomOperationsTest.java
@@ -49,7 +49,6 @@ import org.apache.ignite.IgniteCache;
import org.apache.ignite.IgniteException;
import org.apache.ignite.cache.CacheAtomicityMode;
import org.apache.ignite.cache.CacheEntryEventSerializableFilter;
-import org.apache.ignite.cache.CacheMemoryMode;
import org.apache.ignite.cache.CacheMode;
import org.apache.ignite.cache.affinity.Affinity;
import org.apache.ignite.cache.query.CacheQueryEntryEvent;
@@ -80,9 +79,6 @@ import static javax.cache.event.EventType.REMOVED;
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.OFFHEAP_TIERED;
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_VALUES;
-import static org.apache.ignite.cache.CacheMemoryMode.ONHEAP_TIERED;
import static org.apache.ignite.cache.CacheMode.PARTITIONED;
import static org.apache.ignite.cache.CacheMode.REPLICATED;
import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
@@ -152,7 +148,6 @@ public class CacheContinuousQueryRandomOperationsTest extends GridCommonAbstract
final CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
1,
ATOMIC,
- ONHEAP_TIERED,
false);
grid(0).createCache(ccfg);
@@ -197,7 +192,6 @@ public class CacheContinuousQueryRandomOperationsTest extends GridCommonAbstract
CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
1,
ATOMIC,
- ONHEAP_TIERED,
false);
doTestContinuousQuery(ccfg, CLIENT);
@@ -210,7 +204,6 @@ public class CacheContinuousQueryRandomOperationsTest extends GridCommonAbstract
CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
1,
ATOMIC,
- ONHEAP_TIERED,
false);
doTestContinuousQuery(ccfg, SERVER);
@@ -223,7 +216,6 @@ public class CacheContinuousQueryRandomOperationsTest extends GridCommonAbstract
CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
1,
ATOMIC,
- ONHEAP_TIERED,
false);
doTestContinuousQuery(ccfg, ALL);
@@ -236,7 +228,6 @@ public class CacheContinuousQueryRandomOperationsTest extends GridCommonAbstract
CacheConfiguration<Object, Object> ccfg = cacheConfiguration(REPLICATED,
0,
ATOMIC,
- ONHEAP_TIERED,
false);
doTestContinuousQuery(ccfg, SERVER);
@@ -249,7 +240,6 @@ public class CacheContinuousQueryRandomOperationsTest extends GridCommonAbstract
CacheConfiguration<Object, Object> ccfg = cacheConfiguration(REPLICATED,
0,
ATOMIC,
- ONHEAP_TIERED,
false);
doTestContinuousQuery(ccfg, ALL);
@@ -262,85 +252,6 @@ public class CacheContinuousQueryRandomOperationsTest extends GridCommonAbstract
CacheConfiguration<Object, Object> ccfg = cacheConfiguration(REPLICATED,
0,
ATOMIC,
- ONHEAP_TIERED,
- false);
-
- doTestContinuousQuery(ccfg, CLIENT);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testAtomicOffheapValues() throws Exception {
- CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
- 1,
- ATOMIC,
- OFFHEAP_VALUES,
- false);
-
- doTestContinuousQuery(ccfg, SERVER);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testAtomicOffheapValuesAllNodes() throws Exception {
- CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
- 1,
- ATOMIC,
- OFFHEAP_VALUES,
- false);
-
- doTestContinuousQuery(ccfg, ALL);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testAtomicOffheapValuesClient() throws Exception {
- CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
- 1,
- ATOMIC,
- OFFHEAP_VALUES,
- false);
-
- doTestContinuousQuery(ccfg, CLIENT);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testAtomicOffheapTiered() throws Exception {
- CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
- 1,
- ATOMIC,
- OFFHEAP_TIERED,
- false);
-
- doTestContinuousQuery(ccfg, SERVER);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testAtomicOffheapTieredAllNodes() throws Exception {
- CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
- 1,
- ATOMIC,
- OFFHEAP_TIERED,
- false);
-
- doTestContinuousQuery(ccfg, ALL);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testAtomicOffheapTieredClient() throws Exception {
- CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
- 1,
- ATOMIC,
- OFFHEAP_TIERED,
false);
doTestContinuousQuery(ccfg, CLIENT);
@@ -353,7 +264,6 @@ public class CacheContinuousQueryRandomOperationsTest extends GridCommonAbstract
CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
0,
ATOMIC,
- ONHEAP_TIERED,
false);
doTestContinuousQuery(ccfg, SERVER);
@@ -366,7 +276,6 @@ public class CacheContinuousQueryRandomOperationsTest extends GridCommonAbstract
CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
0,
ATOMIC,
- ONHEAP_TIERED,
false);
doTestContinuousQuery(ccfg, ALL);
@@ -379,7 +288,6 @@ public class CacheContinuousQueryRandomOperationsTest extends GridCommonAbstract
CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
0,
ATOMIC,
- ONHEAP_TIERED,
false);
doTestContinuousQuery(ccfg, CLIENT);
@@ -392,7 +300,6 @@ public class CacheContinuousQueryRandomOperationsTest extends GridCommonAbstract
CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
1,
TRANSACTIONAL,
- ONHEAP_TIERED,
false);
doTestContinuousQuery(ccfg, SERVER);
@@ -405,7 +312,6 @@ public class CacheContinuousQueryRandomOperationsTest extends GridCommonAbstract
CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
1,
TRANSACTIONAL,
- ONHEAP_TIERED,
false);
doTestContinuousQuery(ccfg, ALL);
@@ -418,7 +324,6 @@ public class CacheContinuousQueryRandomOperationsTest extends GridCommonAbstract
CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
1,
TRANSACTIONAL,
- ONHEAP_TIERED,
false);
doTestContinuousQuery(ccfg, SERVER);
@@ -431,7 +336,6 @@ public class CacheContinuousQueryRandomOperationsTest extends GridCommonAbstract
CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
0,
ATOMIC,
- ONHEAP_TIERED,
false);
doTestNotModifyOperation(ccfg);
@@ -444,7 +348,6 @@ public class CacheContinuousQueryRandomOperationsTest extends GridCommonAbstract
CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
0,
ATOMIC,
- ONHEAP_TIERED,
false);
doTestNotModifyOperation(ccfg);
@@ -457,7 +360,6 @@ public class CacheContinuousQueryRandomOperationsTest extends GridCommonAbstract
CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
1,
ATOMIC,
- ONHEAP_TIERED,
false);
doTestNotModifyOperation(ccfg);
@@ -470,33 +372,6 @@ public class CacheContinuousQueryRandomOperationsTest extends GridCommonAbstract
CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
1,
ATOMIC,
- ONHEAP_TIERED,
- true);
-
- doTestNotModifyOperation(ccfg);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testDoubleRemoveAtomicOffheap() throws Exception {
- CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
- 0,
- ATOMIC,
- OFFHEAP_TIERED,
- false);
-
- doTestNotModifyOperation(ccfg);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testDoubleRemoveAtomicOffheapWithStore() throws Exception {
- CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
- 0,
- ATOMIC,
- OFFHEAP_TIERED,
true);
doTestNotModifyOperation(ccfg);
@@ -509,7 +384,6 @@ public class CacheContinuousQueryRandomOperationsTest extends GridCommonAbstract
CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
1,
TRANSACTIONAL,
- ONHEAP_TIERED,
false);
doTestNotModifyOperation(ccfg);
@@ -522,7 +396,6 @@ public class CacheContinuousQueryRandomOperationsTest extends GridCommonAbstract
CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
1,
TRANSACTIONAL,
- ONHEAP_TIERED,
false);
doTestNotModifyOperation(ccfg);
@@ -535,7 +408,6 @@ public class CacheContinuousQueryRandomOperationsTest extends GridCommonAbstract
CacheConfiguration<Object, Object> ccfg = cacheConfiguration(REPLICATED,
0,
TRANSACTIONAL,
- ONHEAP_TIERED,
false);
doTestNotModifyOperation(ccfg);
@@ -548,7 +420,6 @@ public class CacheContinuousQueryRandomOperationsTest extends GridCommonAbstract
CacheConfiguration<Object, Object> ccfg = cacheConfiguration(REPLICATED,
0,
TRANSACTIONAL,
- ONHEAP_TIERED,
false);
doTestNotModifyOperation(ccfg);
@@ -561,7 +432,6 @@ public class CacheContinuousQueryRandomOperationsTest extends GridCommonAbstract
CacheConfiguration<Object, Object> ccfg = cacheConfiguration(REPLICATED,
0,
ATOMIC,
- ONHEAP_TIERED,
false);
doTestNotModifyOperation(ccfg);
@@ -574,7 +444,6 @@ public class CacheContinuousQueryRandomOperationsTest extends GridCommonAbstract
CacheConfiguration<Object, Object> ccfg = cacheConfiguration(REPLICATED,
0,
ATOMIC,
- ONHEAP_TIERED,
true);
doTestNotModifyOperation(ccfg);
@@ -856,7 +725,6 @@ public class CacheContinuousQueryRandomOperationsTest extends GridCommonAbstract
CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
1,
TRANSACTIONAL,
- ONHEAP_TIERED,
false);
doTestContinuousQuery(ccfg, CLIENT);
@@ -869,7 +737,6 @@ public class CacheContinuousQueryRandomOperationsTest extends GridCommonAbstract
CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
1,
TRANSACTIONAL,
- ONHEAP_TIERED,
false);
doTestContinuousQuery(ccfg, CLIENT);
@@ -882,7 +749,6 @@ public class CacheContinuousQueryRandomOperationsTest extends GridCommonAbstract
CacheConfiguration<Object, Object> ccfg = cacheConfiguration(REPLICATED,
0,
TRANSACTIONAL,
- ONHEAP_TIERED,
false);
doTestContinuousQuery(ccfg, SERVER);
@@ -895,111 +761,6 @@ public class CacheContinuousQueryRandomOperationsTest extends GridCommonAbstract
CacheConfiguration<Object, Object> ccfg = cacheConfiguration(REPLICATED,
0,
TRANSACTIONAL,
- ONHEAP_TIERED,
- false);
-
- doTestContinuousQuery(ccfg, CLIENT);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testTxOffheapValues() throws Exception {
- CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
- 1,
- TRANSACTIONAL,
- OFFHEAP_VALUES,
- false);
-
- doTestContinuousQuery(ccfg, SERVER);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testTxOffheapValuesAllNodes() throws Exception {
- CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
- 1,
- TRANSACTIONAL,
- OFFHEAP_VALUES,
- false);
-
- doTestContinuousQuery(ccfg, ALL);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testTxOffheapValuesExplicit() throws Exception {
- CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
- 1,
- TRANSACTIONAL,
- OFFHEAP_VALUES,
- false);
-
- doTestContinuousQuery(ccfg, SERVER);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testTxOffheapValuesClient() throws Exception {
- CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
- 1,
- TRANSACTIONAL,
- OFFHEAP_VALUES,
- false);
-
- doTestContinuousQuery(ccfg, CLIENT);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testTxOffheapTiered() throws Exception {
- CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
- 1,
- TRANSACTIONAL,
- OFFHEAP_TIERED,
- false);
-
- doTestContinuousQuery(ccfg, SERVER);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testTxOffheapTieredAllNodes() throws Exception {
- CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
- 1,
- TRANSACTIONAL,
- OFFHEAP_TIERED,
- false);
-
- doTestContinuousQuery(ccfg, ALL);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testTxOffheapTieredClient() throws Exception {
- CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
- 1,
- TRANSACTIONAL,
- OFFHEAP_TIERED,
- false);
-
- doTestContinuousQuery(ccfg, CLIENT);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testTxOffheapTieredClientExplicit() throws Exception {
- CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
- 1,
- TRANSACTIONAL,
- OFFHEAP_TIERED,
false);
doTestContinuousQuery(ccfg, CLIENT);
@@ -1012,7 +773,6 @@ public class CacheContinuousQueryRandomOperationsTest extends GridCommonAbstract
CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
0,
TRANSACTIONAL,
- ONHEAP_TIERED,
false);
doTestContinuousQuery(ccfg, SERVER);
@@ -1025,7 +785,6 @@ public class CacheContinuousQueryRandomOperationsTest extends GridCommonAbstract
CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
0,
TRANSACTIONAL,
- ONHEAP_TIERED,
false);
doTestContinuousQuery(ccfg, ALL);
@@ -1038,7 +797,6 @@ public class CacheContinuousQueryRandomOperationsTest extends GridCommonAbstract
CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
0,
TRANSACTIONAL,
- ONHEAP_TIERED,
false);
doTestContinuousQuery(ccfg, SERVER);
@@ -1051,7 +809,6 @@ public class CacheContinuousQueryRandomOperationsTest extends GridCommonAbstract
CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
0,
TRANSACTIONAL,
- ONHEAP_TIERED,
false);
doTestContinuousQuery(ccfg, CLIENT);
@@ -1633,7 +1390,6 @@ public class CacheContinuousQueryRandomOperationsTest extends GridCommonAbstract
* @param cacheMode Cache mode.
* @param backups Number of backups.
* @param atomicityMode Cache atomicity mode.
- * @param memoryMode Cache memory mode.
* @param store If {@code true} configures dummy cache store.
* @return Cache configuration.
*/
@@ -1641,14 +1397,12 @@ public class CacheContinuousQueryRandomOperationsTest extends GridCommonAbstract
CacheMode cacheMode,
int backups,
CacheAtomicityMode atomicityMode,
- CacheMemoryMode memoryMode,
boolean store) {
CacheConfiguration<Object, Object> ccfg = new CacheConfiguration<>();
ccfg.setName("cache-" + UUID.randomUUID()); // TODO GG-11220 (remove setName when fixed).
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/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheKeepBinaryIterationNearEnabledTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheKeepBinaryIterationNearEnabledTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheKeepBinaryIterationNearEnabledTest.java
index 02d72b8..9eb56dc 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheKeepBinaryIterationNearEnabledTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheKeepBinaryIterationNearEnabledTest.java
@@ -18,7 +18,6 @@
package org.apache.ignite.internal.processors.cache.query.continuous;
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.NearCacheConfiguration;
@@ -31,10 +30,9 @@ public class CacheKeepBinaryIterationNearEnabledTest extends CacheKeepBinaryIter
@Override protected CacheConfiguration<Object, Object> cacheConfiguration(
CacheMode cacheMode,
int backups,
- CacheAtomicityMode atomicityMode,
- CacheMemoryMode memoryMode) {
+ CacheAtomicityMode atomicityMode) {
CacheConfiguration<Object, Object> ccfg =
- super.cacheConfiguration(cacheMode, backups, atomicityMode, memoryMode);
+ super.cacheConfiguration(cacheMode, backups, atomicityMode);
ccfg.setNearConfiguration(new NearCacheConfiguration<>());
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheKeepBinaryIterationStoreEnabledTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheKeepBinaryIterationStoreEnabledTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheKeepBinaryIterationStoreEnabledTest.java
index f345611..f98229d 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheKeepBinaryIterationStoreEnabledTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheKeepBinaryIterationStoreEnabledTest.java
@@ -20,7 +20,6 @@ package org.apache.ignite.internal.processors.cache.query.continuous;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMemoryMode;
import org.apache.ignite.cache.CacheMode;
import org.apache.ignite.cache.CacheWriteSynchronizationMode;
import org.apache.ignite.cache.store.CacheStoreAdapter;
@@ -37,10 +36,9 @@ public class CacheKeepBinaryIterationStoreEnabledTest extends CacheKeepBinaryIte
@Override protected CacheConfiguration<Object, Object> cacheConfiguration(
CacheMode cacheMode,
int backups,
- CacheAtomicityMode atomicityMode,
- CacheMemoryMode memoryMode) {
+ CacheAtomicityMode atomicityMode) {
CacheConfiguration<Object, Object> ccfg =
- super.cacheConfiguration(cacheMode, backups, atomicityMode, memoryMode);
+ super.cacheConfiguration(cacheMode, backups, atomicityMode);
ccfg.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC);
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheKeepBinaryIterationTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheKeepBinaryIterationTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheKeepBinaryIterationTest.java
index 72667f6..46df90d 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheKeepBinaryIterationTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheKeepBinaryIterationTest.java
@@ -22,7 +22,6 @@ import javax.cache.Cache;
import org.apache.ignite.IgniteCache;
import org.apache.ignite.binary.BinaryObject;
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.query.QueryCursor;
@@ -42,8 +41,6 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
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.OFFHEAP_TIERED;
-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;
@@ -92,27 +89,7 @@ public class CacheKeepBinaryIterationTest extends GridCommonAbstractTest {
* @throws Exception If failed.
*/
public void testAtomicOnHeap() throws Exception {
- CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
- 1,
- ATOMIC,
- ONHEAP_TIERED
- );
-
- doTestScanQuery(ccfg, true, true);
- doTestScanQuery(ccfg, true, false);
- doTestScanQuery(ccfg, false, true);
- doTestScanQuery(ccfg, false, false);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testAtomicOffHeap() throws Exception {
- CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
- 1,
- ATOMIC,
- OFFHEAP_TIERED
- );
+ CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED, 1, ATOMIC);
doTestScanQuery(ccfg, true, true);
doTestScanQuery(ccfg, true, false);
@@ -124,27 +101,7 @@ public class CacheKeepBinaryIterationTest extends GridCommonAbstractTest {
* @throws Exception If failed.
*/
public void testTxOnHeap() throws Exception {
- CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
- 1,
- TRANSACTIONAL,
- ONHEAP_TIERED
- );
-
- doTestScanQuery(ccfg, true, true);
- doTestScanQuery(ccfg, true, false);
- doTestScanQuery(ccfg, false, true);
- doTestScanQuery(ccfg, false, false);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testTxOffHeap() throws Exception {
- CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
- 1,
- TRANSACTIONAL,
- OFFHEAP_TIERED
- );
+ CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,1, TRANSACTIONAL);
doTestScanQuery(ccfg, true, true);
doTestScanQuery(ccfg, true, false);
@@ -156,27 +113,7 @@ public class CacheKeepBinaryIterationTest extends GridCommonAbstractTest {
* @throws Exception If failed.
*/
public void testAtomicOnHeapLocalEntries() throws Exception {
- CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
- 1,
- ATOMIC,
- ONHEAP_TIERED
- );
-
- doTestLocalEntries(ccfg, true, true);
- doTestLocalEntries(ccfg, true, false);
- doTestLocalEntries(ccfg, false, true);
- doTestLocalEntries(ccfg, false, false);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testAtomicOffHeapLocalEntries() throws Exception {
- CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
- 1,
- ATOMIC,
- OFFHEAP_TIERED
- );
+ CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED, 1, ATOMIC);
doTestLocalEntries(ccfg, true, true);
doTestLocalEntries(ccfg, true, false);
@@ -188,27 +125,7 @@ public class CacheKeepBinaryIterationTest extends GridCommonAbstractTest {
* @throws Exception If failed.
*/
public void testTxOnHeapLocalEntries() throws Exception {
- CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
- 1,
- TRANSACTIONAL,
- ONHEAP_TIERED
- );
-
- doTestLocalEntries(ccfg, true, true);
- doTestLocalEntries(ccfg, true, false);
- doTestLocalEntries(ccfg, false, true);
- doTestLocalEntries(ccfg, false, false);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testTxOffHeapLocalEntries() throws Exception {
- CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
- 1,
- TRANSACTIONAL,
- OFFHEAP_TIERED
- );
+ CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED, 1, TRANSACTIONAL);
doTestLocalEntries(ccfg, true, true);
doTestLocalEntries(ccfg, true, false);
@@ -304,9 +221,6 @@ public class CacheKeepBinaryIterationTest extends GridCommonAbstractTest {
cache0 = cache0.withKeepBinary();
for (CachePeekMode mode : CachePeekMode.values()) {
- if (mode == CachePeekMode.SWAP)
- continue;
-
int size = 0;
for (Cache.Entry<Object, Object> e : cache0.localEntries(mode)) {
@@ -332,11 +246,7 @@ public class CacheKeepBinaryIterationTest extends GridCommonAbstractTest {
if (mode == CachePeekMode.ALL ||
mode == CachePeekMode.PRIMARY ||
mode == CachePeekMode.BACKUP ||
- (mode == CachePeekMode.NEAR && i == 0 &&
- ccfg.getMemoryMode() == CacheMemoryMode.ONHEAP_TIERED &&
- ccfg.getNearConfiguration() != null) ||
- (mode == CachePeekMode.ONHEAP && ccfg.getMemoryMode() == CacheMemoryMode.ONHEAP_TIERED) ||
- (mode == CachePeekMode.OFFHEAP && ccfg.getMemoryMode() == CacheMemoryMode.OFFHEAP_TIERED))
+ (mode == CachePeekMode.NEAR && i == 0 && ccfg.getNearConfiguration() != null))
assertTrue("Zero result at mode: " + mode, size > 0);
}
}
@@ -363,19 +273,16 @@ public class CacheKeepBinaryIterationTest extends GridCommonAbstractTest {
* @param cacheMode Cache mode.
* @param backups Number of backups.
* @param atomicityMode Cache atomicity mode.
- * @param memoryMode Cache memory mode.
* @return Cache configuration.
*/
protected CacheConfiguration<Object, Object> cacheConfiguration(
CacheMode cacheMode,
int backups,
- CacheAtomicityMode atomicityMode,
- CacheMemoryMode memoryMode) {
+ CacheAtomicityMode atomicityMode) {
CacheConfiguration<Object, Object> 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/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryAbstractSelfTest.java
index 3130b0c..abd7036 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryAbstractSelfTest.java
@@ -43,7 +43,6 @@ import org.apache.ignite.IgniteCache;
import org.apache.ignite.IgniteException;
import org.apache.ignite.cache.CacheAtomicityMode;
import org.apache.ignite.cache.CacheEntryEventSerializableFilter;
-import org.apache.ignite.cache.CacheMemoryMode;
import org.apache.ignite.cache.CacheMode;
import org.apache.ignite.cache.CachePeekMode;
import org.apache.ignite.cache.query.ContinuousQuery;
@@ -79,7 +78,6 @@ import static java.util.concurrent.TimeUnit.MILLISECONDS;
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.LOCAL;
import static org.apache.ignite.cache.CacheMode.PARTITIONED;
import static org.apache.ignite.cache.CacheMode.REPLICATED;
@@ -121,7 +119,6 @@ public abstract class GridCacheContinuousQueryAbstractSelfTest extends GridCommo
cacheCfg.setReadThrough(true);
cacheCfg.setWriteThrough(true);
cacheCfg.setLoadPreviousValue(true);
- cacheCfg.setMemoryMode(memoryMode());
cfg.setCacheConfiguration(cacheCfg);
}
@@ -140,13 +137,6 @@ public abstract class GridCacheContinuousQueryAbstractSelfTest extends GridCommo
}
/**
- * @return Cache memory mode.
- */
- protected CacheMemoryMode memoryMode() {
- return ONHEAP_TIERED;
- }
-
- /**
* @return Peer class loading enabled flag.
*/
protected boolean peerClassLoadingEnabled() {
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryAtomicOffheapTieredTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryAtomicOffheapTieredTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryAtomicOffheapTieredTest.java
deleted file mode 100644
index d6948e2..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryAtomicOffheapTieredTest.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.internal.processors.cache.query.continuous;
-
-import org.apache.ignite.cache.CacheMemoryMode;
-
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
-
-/**
- *
- */
-public class GridCacheContinuousQueryAtomicOffheapTieredTest extends GridCacheContinuousQueryAtomicSelfTest {
- /** {@inheritDoc} */
- @Override protected CacheMemoryMode memoryMode() {
- return OFFHEAP_TIERED;
- }
-}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryAtomicOffheapValuesTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryAtomicOffheapValuesTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryAtomicOffheapValuesTest.java
deleted file mode 100644
index 4002435..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryAtomicOffheapValuesTest.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.internal.processors.cache.query.continuous;
-
-import org.apache.ignite.cache.CacheMemoryMode;
-
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_VALUES;
-
-/**
- *
- */
-public class GridCacheContinuousQueryAtomicOffheapValuesTest extends GridCacheContinuousQueryAtomicSelfTest {
- /** {@inheritDoc} */
- @Override protected CacheMemoryMode memoryMode() {
- return OFFHEAP_VALUES;
- }
-}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryTxOffheapTieredTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryTxOffheapTieredTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryTxOffheapTieredTest.java
deleted file mode 100644
index bcba7b6..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryTxOffheapTieredTest.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.internal.processors.cache.query.continuous;
-
-import org.apache.ignite.cache.CacheMemoryMode;
-
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
-
-/**
- *
- */
-public class GridCacheContinuousQueryTxOffheapTieredTest extends GridCacheContinuousQueryTxSelfTest {
- /** {@inheritDoc} */
- @Override protected CacheMemoryMode memoryMode() {
- return OFFHEAP_TIERED;
- }
-}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryTxOffheapValuesTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryTxOffheapValuesTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryTxOffheapValuesTest.java
deleted file mode 100644
index 2994af6..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryTxOffheapValuesTest.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.internal.processors.cache.query.continuous;
-
-import org.apache.ignite.cache.CacheMemoryMode;
-
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_VALUES;
-
-/**
- *
- */
-public class GridCacheContinuousQueryTxOffheapValuesTest extends GridCacheContinuousQueryTxSelfTest {
- /** {@inheritDoc} */
- @Override protected CacheMemoryMode memoryMode() {
- return OFFHEAP_VALUES;
- }
-}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryPartitionedAtomicOffHeapSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryPartitionedAtomicOffHeapSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryPartitionedAtomicOffHeapSelfTest.java
deleted file mode 100644
index 229cec4..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryPartitionedAtomicOffHeapSelfTest.java
+++ /dev/null
@@ -1,35 +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.version;
-
-import org.apache.ignite.cache.CacheMemoryMode;
-import org.apache.ignite.configuration.CacheConfiguration;
-
-/**
- *
- */
-public class CacheVersionedEntryPartitionedAtomicOffHeapSelfTest extends CacheVersionedEntryPartitionedAtomicSelfTest {
- /** {@inheritDoc} */
- @Override protected CacheConfiguration cacheConfiguration(String igniteInstanceName) throws Exception {
- CacheConfiguration cfg = super.cacheConfiguration(igniteInstanceName);
-
- cfg.setMemoryMode(CacheMemoryMode.OFFHEAP_TIERED);
-
- return cfg;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryPartitionedTransactionalOffHeapSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryPartitionedTransactionalOffHeapSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryPartitionedTransactionalOffHeapSelfTest.java
deleted file mode 100644
index d729780..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryPartitionedTransactionalOffHeapSelfTest.java
+++ /dev/null
@@ -1,36 +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.version;
-
-import org.apache.ignite.cache.CacheMemoryMode;
-import org.apache.ignite.configuration.CacheConfiguration;
-
-/**
- *
- */
-public class CacheVersionedEntryPartitionedTransactionalOffHeapSelfTest extends
- CacheVersionedEntryPartitionedTransactionalSelfTest {
- /** {@inheritDoc} */
- @Override protected CacheConfiguration cacheConfiguration(String igniteInstanceName) throws Exception {
- CacheConfiguration cfg = super.cacheConfiguration(igniteInstanceName);
-
- cfg.setMemoryMode(CacheMemoryMode.OFFHEAP_TIERED);
-
- return cfg;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryReplicatedAtomicOffHeapSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryReplicatedAtomicOffHeapSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryReplicatedAtomicOffHeapSelfTest.java
deleted file mode 100644
index aa46101..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryReplicatedAtomicOffHeapSelfTest.java
+++ /dev/null
@@ -1,35 +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.version;
-
-import org.apache.ignite.cache.CacheMemoryMode;
-import org.apache.ignite.configuration.CacheConfiguration;
-
-/**
- *
- */
-public class CacheVersionedEntryReplicatedAtomicOffHeapSelfTest extends CacheVersionedEntryReplicatedAtomicSelfTest {
- /** {@inheritDoc} */
- @Override protected CacheConfiguration cacheConfiguration(String igniteInstanceName) throws Exception {
- CacheConfiguration cfg = super.cacheConfiguration(igniteInstanceName);
-
- cfg.setMemoryMode(CacheMemoryMode.OFFHEAP_TIERED);
-
- return cfg;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryReplicatedTransactionalOffHeapSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryReplicatedTransactionalOffHeapSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryReplicatedTransactionalOffHeapSelfTest.java
deleted file mode 100644
index c0cc89f..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryReplicatedTransactionalOffHeapSelfTest.java
+++ /dev/null
@@ -1,36 +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.version;
-
-import org.apache.ignite.cache.CacheMemoryMode;
-import org.apache.ignite.configuration.CacheConfiguration;
-
-/**
- *
- */
-public class CacheVersionedEntryReplicatedTransactionalOffHeapSelfTest extends
- CacheVersionedEntryReplicatedTransactionalSelfTest {
- /** {@inheritDoc} */
- @Override protected CacheConfiguration cacheConfiguration(String igniteInstanceName) throws Exception {
- CacheConfiguration cfg = super.cacheConfiguration(igniteInstanceName);
-
- cfg.setMemoryMode(CacheMemoryMode.OFFHEAP_TIERED);
-
- return cfg;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamProcessorSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamProcessorSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamProcessorSelfTest.java
index 080902c..ec2aa61 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamProcessorSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamProcessorSelfTest.java
@@ -132,8 +132,6 @@ public class DataStreamProcessorSelfTest extends GridCommonAbstractTest {
cc.setWriteSynchronizationMode(FULL_SYNC);
- cc.setEvictSynchronized(false);
-
if (store != null) {
cc.setCacheStoreFactory(new IgniteReflectionFactory<CacheStore>(TestStore.class));
cc.setReadThrough(true);
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsAbstractBaseSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsAbstractBaseSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsAbstractBaseSelfTest.java
index 38d6c7b..55e1905 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsAbstractBaseSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsAbstractBaseSelfTest.java
@@ -31,7 +31,6 @@ import org.apache.ignite.IgniteCheckedException;
import org.apache.ignite.IgniteException;
import org.apache.ignite.IgniteFileSystem;
import org.apache.ignite.Ignition;
-import org.apache.ignite.cache.CacheMemoryMode;
import org.apache.ignite.cache.CacheWriteSynchronizationMode;
import org.apache.ignite.configuration.CacheConfiguration;
import org.apache.ignite.configuration.FileSystemConfiguration;
@@ -61,7 +60,6 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
import org.jetbrains.annotations.Nullable;
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.CacheMode.REPLICATED;
import static org.apache.ignite.igfs.IgfsMode.DUAL_ASYNC;
@@ -166,9 +164,6 @@ public abstract class IgfsAbstractBaseSelfTest extends IgfsCommonAbstractTest {
/** Dual mode flag. */
protected final boolean dual;
- /** Memory mode. */
- protected final CacheMemoryMode memoryMode;
-
/** IP finder for primary topology. */
protected final TcpDiscoveryVmIpFinder primaryIpFinder = new TcpDiscoveryVmIpFinder(true);
@@ -196,18 +191,7 @@ public abstract class IgfsAbstractBaseSelfTest extends IgfsCommonAbstractTest {
* @param mode IGFS mode.
*/
protected IgfsAbstractBaseSelfTest(IgfsMode mode) {
- this(mode, ONHEAP_TIERED);
- }
-
- /**
- * Constructor.
- *
- * @param mode IGFS mode.
- * @param memoryMode Memory mode.
- */
- protected IgfsAbstractBaseSelfTest(IgfsMode mode, CacheMemoryMode memoryMode) {
this.mode = mode;
- this.memoryMode = memoryMode;
dual = (mode == DUAL_SYNC || mode == DUAL_ASYNC);
}
@@ -396,8 +380,6 @@ public abstract class IgfsAbstractBaseSelfTest extends IgfsCommonAbstractTest {
dataCacheCfg.setAffinityMapper(new IgfsGroupDataBlocksKeyMapper(2));
dataCacheCfg.setBackups(0);
dataCacheCfg.setAtomicityMode(TRANSACTIONAL);
- dataCacheCfg.setMemoryMode(memoryMode);
- dataCacheCfg.setOffHeapMaxMemory(0);
CacheConfiguration metaCacheCfg = defaultCacheConfiguration();
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsAbstractSelfTest.java
index 0e776b1..f3d6db6 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsAbstractSelfTest.java
@@ -19,7 +19,6 @@ package org.apache.ignite.internal.processors.igfs;
import org.apache.ignite.IgniteCheckedException;
import org.apache.ignite.IgniteException;
-import org.apache.ignite.cache.CacheMemoryMode;
import org.apache.ignite.cache.CachePeekMode;
import org.apache.ignite.igfs.IgfsDirectoryNotEmptyException;
import org.apache.ignite.igfs.IgfsException;
@@ -79,16 +78,6 @@ public abstract class IgfsAbstractSelfTest extends IgfsAbstractBaseSelfTest {
}
/**
- * Constructor.
- *
- * @param mode IGFS mode.
- * @param memoryMode Memory mode.
- */
- protected IgfsAbstractSelfTest(IgfsMode mode, CacheMemoryMode memoryMode) {
- super(mode, memoryMode);
- }
-
- /**
* Test existence check when the path exists both locally and remotely.
*
* @throws Exception If failed.
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsAtomicPrimaryOffheapTieredSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsAtomicPrimaryOffheapTieredSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsAtomicPrimaryOffheapTieredSelfTest.java
deleted file mode 100644
index 09b4f9e..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsAtomicPrimaryOffheapTieredSelfTest.java
+++ /dev/null
@@ -1,39 +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.igfs;
-
-import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.configuration.CacheConfiguration;
-
-/**
- * Tests for PRIMARY mode.
- */
-public class IgfsAtomicPrimaryOffheapTieredSelfTest extends IgfsPrimaryOffheapTieredSelfTest {
- /** {@inheritDoc} */
- @Override protected boolean fragmentizerEnabled() {
- return false;
- }
-
- /** {@inheritDoc} */
- @Override protected void prepareCacheConfigurations(CacheConfiguration dataCacheCfg,
- CacheConfiguration metaCacheCfg) {
- super.prepareCacheConfigurations(dataCacheCfg, metaCacheCfg);
-
- dataCacheCfg.setAtomicityMode(CacheAtomicityMode.ATOMIC);
- }
-}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsAtomicPrimaryOffheapValuesSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsAtomicPrimaryOffheapValuesSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsAtomicPrimaryOffheapValuesSelfTest.java
deleted file mode 100644
index 8e9965d..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsAtomicPrimaryOffheapValuesSelfTest.java
+++ /dev/null
@@ -1,39 +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.igfs;
-
-import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.configuration.CacheConfiguration;
-
-/**
- * Tests for PRIMARY mode.
- */
-public class IgfsAtomicPrimaryOffheapValuesSelfTest extends IgfsPrimaryOffheapValuesSelfTest {
- /** {@inheritDoc} */
- @Override protected boolean fragmentizerEnabled() {
- return false;
- }
-
- /** {@inheritDoc} */
- @Override protected void prepareCacheConfigurations(CacheConfiguration dataCacheCfg,
- CacheConfiguration metaCacheCfg) {
- super.prepareCacheConfigurations(dataCacheCfg, metaCacheCfg);
-
- dataCacheCfg.setAtomicityMode(CacheAtomicityMode.ATOMIC);
- }
-}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsCachePerBlockLruEvictionPolicySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsCachePerBlockLruEvictionPolicySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsCachePerBlockLruEvictionPolicySelfTest.java
index 32e7e17..9e24ba8 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsCachePerBlockLruEvictionPolicySelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsCachePerBlockLruEvictionPolicySelfTest.java
@@ -121,6 +121,7 @@ public class IgfsCachePerBlockLruEvictionPolicySelfTest extends IgfsCommonAbstra
evictPlc = new IgfsPerBlockLruEvictionPolicy();
dataCacheCfg.setEvictionPolicy(evictPlc);
+ dataCacheCfg.setOnheapCacheEnabled(true);
dataCacheCfg.setAffinityMapper(new IgfsGroupDataBlocksKeyMapper(128));
dataCacheCfg.setBackups(0);
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsMaxSizeSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsMaxSizeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsMaxSizeSelfTest.java
index bfba10a..2e0be3f 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsMaxSizeSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsMaxSizeSelfTest.java
@@ -55,7 +55,6 @@ public class IgfsMaxSizeSelfTest extends IgfsCommonAbstractTest {
dataCacheCfg.setAffinityMapper(new IgfsGroupDataBlocksKeyMapper(2));
dataCacheCfg.setBackups(0);
dataCacheCfg.setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL);
- dataCacheCfg.setOffHeapMaxMemory(0);
CacheConfiguration metaCacheCfg = defaultCacheConfiguration();
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsPrimaryOffheapTieredSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsPrimaryOffheapTieredSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsPrimaryOffheapTieredSelfTest.java
deleted file mode 100644
index 21c5017..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsPrimaryOffheapTieredSelfTest.java
+++ /dev/null
@@ -1,33 +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.igfs;
-
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
-import static org.apache.ignite.igfs.IgfsMode.PRIMARY;
-
-/**
- * Tests for PRIMARY mode and OFFHEAP_TIERED memory.
- */
-public class IgfsPrimaryOffheapTieredSelfTest extends IgfsAbstractSelfTest {
- /**
- * Constructor.
- */
- public IgfsPrimaryOffheapTieredSelfTest() {
- super(PRIMARY, OFFHEAP_TIERED);
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsPrimaryOffheapValuesSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsPrimaryOffheapValuesSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsPrimaryOffheapValuesSelfTest.java
deleted file mode 100644
index b079186..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsPrimaryOffheapValuesSelfTest.java
+++ /dev/null
@@ -1,33 +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.igfs;
-
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_VALUES;
-import static org.apache.ignite.igfs.IgfsMode.PRIMARY;
-
-/**
- * Tests for PRIMARY mode and OFFHEAP_VALUES memory.
- */
-public class IgfsPrimaryOffheapValuesSelfTest extends IgfsAbstractSelfTest {
- /**
- * Constructor.
- */
- public IgfsPrimaryOffheapValuesSelfTest() {
- super(PRIMARY, OFFHEAP_VALUES);
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/loadtests/GridCacheMultiNodeLoadTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/loadtests/GridCacheMultiNodeLoadTest.java b/modules/core/src/test/java/org/apache/ignite/loadtests/GridCacheMultiNodeLoadTest.java
index e40ce76..ac98f9c 100644
--- a/modules/core/src/test/java/org/apache/ignite/loadtests/GridCacheMultiNodeLoadTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/loadtests/GridCacheMultiNodeLoadTest.java
@@ -69,6 +69,7 @@ public class GridCacheMultiNodeLoadTest extends GridCommonAbstractTest {
plc.setMaxSize(100000);
cacheCfg.setEvictionPolicy(plc);
+ cacheCfg.setOnheapCacheEnabled(true);
cacheCfg.setBackups(1);
cacheCfg.setRebalanceMode(SYNC);
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/loadtests/datastructures/GridCachePartitionedAtomicLongLoadTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/loadtests/datastructures/GridCachePartitionedAtomicLongLoadTest.java b/modules/core/src/test/java/org/apache/ignite/loadtests/datastructures/GridCachePartitionedAtomicLongLoadTest.java
index 25b1059..c5cea67 100644
--- a/modules/core/src/test/java/org/apache/ignite/loadtests/datastructures/GridCachePartitionedAtomicLongLoadTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/loadtests/datastructures/GridCachePartitionedAtomicLongLoadTest.java
@@ -79,9 +79,9 @@ public class GridCachePartitionedAtomicLongLoadTest extends GridCommonAbstractTe
plc.setMaxSize(1000);
cc.setEvictionPolicy(plc);
+ cc.setOnheapCacheEnabled(true);
cc.setBackups(1);
cc.setAffinity(new RendezvousAffinityFunction(true));
- cc.setEvictSynchronized(true);
c.setCacheConfiguration(cc);
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/IgniteClientReconnectMassiveShutdownTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/IgniteClientReconnectMassiveShutdownTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/IgniteClientReconnectMassiveShutdownTest.java
index 6402e63..50e5093 100644
--- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/IgniteClientReconnectMassiveShutdownTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/IgniteClientReconnectMassiveShutdownTest.java
@@ -45,7 +45,6 @@ import org.apache.ignite.transactions.Transaction;
import static java.util.concurrent.TimeUnit.SECONDS;
import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
import static org.apache.ignite.cache.CacheMode.PARTITIONED;
import static org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC;
import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_READ;
@@ -139,8 +138,6 @@ public class IgniteClientReconnectMassiveShutdownTest extends GridCommonAbstract
cfg.setCacheMode(PARTITIONED);
cfg.setAtomicityMode(TRANSACTIONAL);
cfg.setBackups(2);
- cfg.setOffHeapMaxMemory(0);
- cfg.setMemoryMode(OFFHEAP_TIERED);
IgniteCache<String, Integer> cache = client.getOrCreateCache(cfg);
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/testframework/GridTestUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/GridTestUtils.java b/modules/core/src/test/java/org/apache/ignite/testframework/GridTestUtils.java
index bbed834..eb3bbe0 100644
--- a/modules/core/src/test/java/org/apache/ignite/testframework/GridTestUtils.java
+++ b/modules/core/src/test/java/org/apache/ignite/testframework/GridTestUtils.java
@@ -66,11 +66,7 @@ import org.apache.ignite.IgniteCheckedException;
import org.apache.ignite.IgniteException;
import org.apache.ignite.IgniteLogger;
import org.apache.ignite.Ignition;
-import org.apache.ignite.cache.CacheMemoryMode;
-import org.apache.ignite.cache.eviction.lru.LruEvictionPolicy;
import org.apache.ignite.cluster.ClusterNode;
-import org.apache.ignite.configuration.CacheConfiguration;
-import org.apache.ignite.configuration.IgniteConfiguration;
import org.apache.ignite.internal.IgniteEx;
import org.apache.ignite.internal.IgniteInternalFuture;
import org.apache.ignite.internal.IgniteInterruptedCheckedException;
@@ -1862,96 +1858,6 @@ public final class GridTestUtils {
}
/**
- * Sets cache configuration parameters according to test memory mode.
- *
- * @param cfg Ignite configuration.
- * @param ccfg Cache configuration.
- * @param testMode Test memory mode.
- * @param maxHeapCnt Maximum number of entries in heap (used if test mode involves eviction from heap).
- * @param maxOffheapSize Maximum offheap memory size (used if test mode involves eviction from offheap to swap).
- */
- public static void setMemoryMode(IgniteConfiguration cfg, CacheConfiguration ccfg,
- TestMemoryMode testMode,
- int maxHeapCnt,
- long maxOffheapSize) {
- assert testMode != null;
- assert ccfg != null;
-
- CacheMemoryMode memMode;
- boolean swap = false;
- boolean evictionPlc = false;
- long offheapMaxMem = -1L;
-
- switch (testMode) {
- case HEAP: {
- memMode = CacheMemoryMode.ONHEAP_TIERED;
- swap = false;
-
- break;
- }
-
- case SWAP: {
- memMode = CacheMemoryMode.ONHEAP_TIERED;
- evictionPlc = true;
- swap = true;
-
- break;
- }
-
- case OFFHEAP_TIERED: {
- memMode = CacheMemoryMode.OFFHEAP_TIERED;
- offheapMaxMem = 0;
-
- break;
- }
-
- case OFFHEAP_TIERED_SWAP: {
- assert maxOffheapSize > 0 : maxOffheapSize;
-
- memMode = CacheMemoryMode.OFFHEAP_TIERED;
- offheapMaxMem = maxOffheapSize;
- swap = true;
-
- break;
- }
-
- case OFFHEAP_EVICT: {
- memMode = CacheMemoryMode.ONHEAP_TIERED;
- evictionPlc = true;
- offheapMaxMem = 0;
-
- break;
- }
-
- case OFFHEAP_EVICT_SWAP: {
- assert maxOffheapSize > 0 : maxOffheapSize;
-
- memMode = CacheMemoryMode.ONHEAP_TIERED;
- swap = true;
- evictionPlc = true;
- offheapMaxMem = maxOffheapSize;
-
- break;
- }
-
- default:
- throw new IllegalArgumentException("Invalid mode: " + testMode);
- }
-
- ccfg.setMemoryMode(memMode);
-
- if (evictionPlc) {
- LruEvictionPolicy plc = new LruEvictionPolicy();
-
- plc.setMaxSize(maxHeapCnt);
-
- ccfg.setEvictionPolicy(plc);
- }
-
- ccfg.setOffHeapMaxMemory(offheapMaxMem);
- }
-
- /**
* Generate random alphabetical string.
*
* @param rnd Random object.
@@ -1968,23 +1874,4 @@ public final class GridTestUtils {
return b.toString();
}
-
-
- /**
- *
- */
- public enum TestMemoryMode {
- /** Heap only. */
- HEAP,
- /** Evict from heap to swap with eviction policy. */
- SWAP,
- /** Always evict to offheap, no swap. */
- OFFHEAP_TIERED,
- /** Always evict to offheap + evict from offheap to swap when max offheap memory limit is reached. */
- OFFHEAP_TIERED_SWAP,
- /** Evict to offheap with eviction policy, no swap. */
- OFFHEAP_EVICT,
- /** Evict to offheap with eviction policy + evict from offheap to swap when max offheap memory limit is reached. */
- OFFHEAP_EVICT_SWAP,
- }
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/testframework/configvariations/ConfigVariations.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/configvariations/ConfigVariations.java b/modules/core/src/test/java/org/apache/ignite/testframework/configvariations/ConfigVariations.java
index 1b1fabc..14cdc2a 100644
--- a/modules/core/src/test/java/org/apache/ignite/testframework/configvariations/ConfigVariations.java
+++ b/modules/core/src/test/java/org/apache/ignite/testframework/configvariations/ConfigVariations.java
@@ -29,7 +29,6 @@ import javax.cache.event.CacheEntryListenerException;
import org.apache.ignite.cache.CacheAtomicWriteOrderMode;
import org.apache.ignite.cache.CacheAtomicityMode;
import org.apache.ignite.cache.CacheInterceptorAdapter;
-import org.apache.ignite.cache.CacheMemoryMode;
import org.apache.ignite.cache.CacheMode;
import org.apache.ignite.cache.CacheRebalanceMode;
import org.apache.ignite.cache.CacheWriteSynchronizationMode;
@@ -46,7 +45,6 @@ import org.apache.ignite.configuration.TopologyValidator;
import org.apache.ignite.internal.binary.BinaryMarshaller;
import org.apache.ignite.internal.processors.cache.MapCacheStoreStrategy;
import org.apache.ignite.marshaller.optimized.OptimizedMarshaller;
-import org.apache.ignite.testframework.junits.IgniteCacheConfigVariationsAbstractTest;
import static org.apache.ignite.internal.util.lang.GridFunc.asArray;
@@ -86,22 +84,6 @@ public class ConfigVariations {
);
/** */
- private static final ConfigParameter<Object> ONHEAP_TIERED_MEMORY_PARAM =
- Parameters.parameter("setMemoryMode", CacheMemoryMode.ONHEAP_TIERED);
-
- /** */
- private static final ConfigParameter<Object> OFFHEAP_TIERED_MEMORY_PARAM =
- Parameters.parameter("setMemoryMode", CacheMemoryMode.OFFHEAP_TIERED);
-
- /** */
- private static final ConfigParameter<Object> OFFHEAP_VALUES_MEMORY_PARAM =
- Parameters.parameter("setMemoryMode", CacheMemoryMode.OFFHEAP_VALUES);
-
- /** */
- private static final ConfigParameter<Object> OFFHEAP_ENABLED =
- Parameters.parameter("setOffHeapMaxMemory", 10 * 1024 * 1024L);
-
- /** */
@SuppressWarnings("unchecked")
private static final ConfigParameter<IgniteConfiguration>[][] BASIC_IGNITE_SET = new ConfigParameter[][] {
Parameters.objectParameters("setMarshaller", Parameters.factory(BinaryMarshaller.class), optimizedMarshallerFactory()),
@@ -113,13 +95,13 @@ public class ConfigVariations {
private static final ConfigParameter<CacheConfiguration>[][] BASIC_CACHE_SET = new ConfigParameter[][] {
Parameters.objectParameters("setCacheMode", CacheMode.REPLICATED, CacheMode.PARTITIONED),
Parameters.enumParameters("setAtomicityMode", CacheAtomicityMode.class),
- Parameters.enumParameters("setMemoryMode", CacheMemoryMode.class),
// Set default parameters.
Parameters.objectParameters("setLoadPreviousValue", true),
asArray(SIMPLE_CACHE_STORE_PARAM),
Parameters.objectParameters("setWriteSynchronizationMode", CacheWriteSynchronizationMode.FULL_SYNC),
Parameters.objectParameters("setAtomicWriteOrderMode", CacheAtomicWriteOrderMode.PRIMARY),
Parameters.objectParameters("setStartSize", 1024),
+ Parameters.booleanParameters("setOnheapCacheEnabled")
};
/** */
@@ -127,11 +109,6 @@ public class ConfigVariations {
private static final ConfigParameter<CacheConfiguration>[][] FULL_CACHE_SET = new ConfigParameter[][] {
Parameters.enumParameters("setCacheMode", CacheMode.class),
Parameters.enumParameters("setAtomicityMode", CacheAtomicityMode.class),
- asArray(ONHEAP_TIERED_MEMORY_PARAM,
- Parameters.complexParameter(ONHEAP_TIERED_MEMORY_PARAM, OFFHEAP_ENABLED),
- Parameters.complexParameter(OFFHEAP_TIERED_MEMORY_PARAM, OFFHEAP_ENABLED),
- Parameters.complexParameter(OFFHEAP_VALUES_MEMORY_PARAM, OFFHEAP_ENABLED)
- ),
Parameters.booleanParameters("setLoadPreviousValue"),
Parameters.booleanParameters("setReadFromBackup"),
Parameters.booleanParameters("setStoreKeepBinary"),
@@ -153,6 +130,7 @@ public class ConfigVariations {
Parameters.objectParameters("setWriteSynchronizationMode", CacheWriteSynchronizationMode.FULL_SYNC),
Parameters.objectParameters("setAtomicWriteOrderMode", CacheAtomicWriteOrderMode.PRIMARY),
Parameters.objectParameters("setStartSize", 1024),
+ Parameters.booleanParameters("setOnheapCacheEnabled")
};
/**
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/testframework/junits/IgniteCacheConfigVariationsAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/junits/IgniteCacheConfigVariationsAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/testframework/junits/IgniteCacheConfigVariationsAbstractTest.java
index 5d01d79..fa287bd 100644
--- a/modules/core/src/test/java/org/apache/ignite/testframework/junits/IgniteCacheConfigVariationsAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/testframework/junits/IgniteCacheConfigVariationsAbstractTest.java
@@ -24,7 +24,6 @@ import org.apache.ignite.IgniteCheckedException;
import org.apache.ignite.IgniteTransactions;
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.configuration.CacheConfiguration;
@@ -43,11 +42,8 @@ import org.apache.ignite.internal.util.typedef.internal.U;
import org.apache.ignite.testframework.GridTestUtils;
import org.apache.ignite.testframework.configvariations.CacheStartMode;
import org.apache.ignite.transactions.Transaction;
-import org.jetbrains.annotations.Nullable;
import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
-import static org.apache.ignite.cache.CacheMemoryMode.ONHEAP_TIERED;
/**
* Abstract class for cache configuration variations tests.
@@ -386,23 +382,6 @@ public abstract class IgniteCacheConfigVariationsAbstractTest extends IgniteConf
}
/**
- * @return {@code True} if values should be stored off-heap.
- */
- protected CacheMemoryMode memoryMode() {
- return cacheConfiguration().getMemoryMode();
- }
-
- /**
- * @return {@code True} if swap should happend after localEvict() call.
- */
- protected boolean swapAfterLocalEvict() {
- if (memoryMode() == OFFHEAP_TIERED)
- return false;
-
- return memoryMode() == ONHEAP_TIERED ? (!offheapEnabled() && swapEnabled()) : swapEnabled();
- }
-
- /**
* @return {@code True} if store is enabled.
*/
protected boolean storeEnabled() {
@@ -410,13 +389,6 @@ public abstract class IgniteCacheConfigVariationsAbstractTest extends IgniteConf
}
/**
- * @return {@code True} if offheap memory is enabled.
- */
- protected boolean offheapEnabled() {
- return cacheConfiguration().getOffHeapMaxMemory() >= 0;
- }
-
- /**
* @return {@code True} if swap is enabled.
*/
protected boolean swapEnabled() {
@@ -513,20 +485,12 @@ public abstract class IgniteCacheConfigVariationsAbstractTest extends IgniteConf
/**
* @param cache Cache.
- * @return {@code True} if cache has OFFHEAP_TIERED memory mode.
- */
- protected static <K, V> boolean offheapTiered(IgniteCache<K, V> cache) {
- return cache.getConfiguration(CacheConfiguration.class).getMemoryMode() == OFFHEAP_TIERED;
- }
-
- /**
- * @param cache Cache.
* @param key Key.
* @return {@code True} if cache contains given key.
* @throws Exception If failed.
*/
@SuppressWarnings("unchecked")
protected static boolean containsKey(IgniteCache cache, Object key) throws Exception {
- return offheapTiered(cache) ? cache.localPeek(key, CachePeekMode.OFFHEAP) != null : cache.containsKey(key);
+ return cache.containsKey(key);
}
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridCommonAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridCommonAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridCommonAbstractTest.java
index e10bebe..9e46040 100644
--- a/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridCommonAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridCommonAbstractTest.java
@@ -715,7 +715,7 @@ public abstract class GridCommonAbstractTest extends GridAbstractTest {
* @param c Cache proxy.
*/
protected void printPartitionState(IgniteCache<?, ?> c) {
- printPartitionState(c.getConfiguration(CacheConfiguration.class).getName(),0);
+ printPartitionState(c.getConfiguration(CacheConfiguration.class).getName(), 0);
}
/**
@@ -1151,6 +1151,14 @@ public abstract class GridCommonAbstractTest extends GridAbstractTest {
}
/**
+ * @param cache Cache.
+ * @param key Key.
+ */
+ protected static <K, V> V localPeekOnHeap(GridCacheAdapter<K, V> cache, K key) throws IgniteCheckedException {
+ return cache.localPeek(key, new CachePeekMode[] {CachePeekMode.ONHEAP}, null);
+ }
+
+ /**
* @param comp Compute.
* @param task Task.
* @param arg Task argument.
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/testframework/test/ConfigVariationsTestSuiteBuilderTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/test/ConfigVariationsTestSuiteBuilderTest.java b/modules/core/src/test/java/org/apache/ignite/testframework/test/ConfigVariationsTestSuiteBuilderTest.java
index d237345..93f0168 100644
--- a/modules/core/src/test/java/org/apache/ignite/testframework/test/ConfigVariationsTestSuiteBuilderTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/testframework/test/ConfigVariationsTestSuiteBuilderTest.java
@@ -41,7 +41,7 @@ public class ConfigVariationsTestSuiteBuilderTest extends TestCase {
TestSuite dfltCacheSuite = new ConfigVariationsTestSuiteBuilder("testSuite", NoopTest.class)
.withBasicCacheParams().build();
- assertEquals(4 * 12, dfltCacheSuite.countTestCases());
+ assertEquals(4 * 4 * 2, dfltCacheSuite.countTestCases());
// With clients.
dfltSuite = new ConfigVariationsTestSuiteBuilder("testSuite", NoopTest.class)
@@ -52,7 +52,7 @@ public class ConfigVariationsTestSuiteBuilderTest extends TestCase {
dfltCacheSuite = new ConfigVariationsTestSuiteBuilder("testSuite", NoopTest.class)
.withBasicCacheParams().testedNodesCount(3).withClients().build();
- assertEquals(4 * 12 * 3, dfltCacheSuite.countTestCases());
+ assertEquals(4 * 4 * 2 * 3, dfltCacheSuite.countTestCases());
}
/**
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java
index 70084f2..0ec0f0d 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java
@@ -42,7 +42,6 @@ import org.apache.ignite.internal.processors.cache.GridLocalIgniteSerializationT
import org.apache.ignite.internal.processors.cache.GridProjectionForCachesOnDaemonNodeSelfTest;
import org.apache.ignite.internal.processors.cache.IgniteDaemonNodeMarshallerCacheTest;
import org.apache.ignite.internal.processors.cache.IgniteMarshallerCacheConcurrentReadWriteTest;
-import org.apache.ignite.internal.processors.cache.OffHeapTieredTransactionSelfTest;
import org.apache.ignite.internal.processors.closure.GridClosureProcessorSelfTest;
import org.apache.ignite.internal.processors.closure.GridClosureSerializationTest;
import org.apache.ignite.internal.processors.continuous.GridEventConsumeSelfTest;
@@ -135,7 +134,6 @@ public class IgniteBasicTestSuite extends TestSuite {
suite.addTestSuite(GridLifecycleAwareSelfTest.class);
suite.addTestSuite(GridMessageListenSelfTest.class);
suite.addTestSuite(GridFailFastNodeFailureDetectionSelfTest.class);
- suite.addTestSuite(OffHeapTieredTransactionSelfTest.class);
suite.addTestSuite(IgniteSlowClientDetectionSelfTest.class);
GridTestUtils.addTestIfNeeded(suite, IgniteDaemonNodeMarshallerCacheTest.class, ignoredTests);
suite.addTestSuite(IgniteMarshallerCacheConcurrentReadWriteTest.class);
[14/17] ignite git commit: IGNITE-4535 - Add option to store
deserialized values on-heap
Posted by ag...@apache.org.
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/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..bfd7806 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<Integer, Integer> 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<Integer, Integer> ccfg2=
+ CacheConfiguration<Integer, Integer> 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<Integer, Integer> 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,18 @@ public class CacheSerializableTransactionsTest extends GridCommonAbstractTest {
}
{
- // Offheap.
+ // Eviction.
CacheConfiguration<Integer, Integer> 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);
+
+ ccfg.setOnheapCacheEnabled(true);
srv.createCache(ccfg);
@@ -4542,7 +4536,7 @@ public class CacheSerializableTransactionsTest extends GridCommonAbstractTest {
}
}
finally {
- destroyCache(cacheName);
+ destroyCache(cacheName);
}
}
@@ -4881,15 +4875,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<Integer, Integer> ccfg = cacheConfiguration(PARTITIONED, FULL_SYNC, 1, false, false);
-
- GridTestUtils.setMemoryMode(null, ccfg, memMode, 1, 64);
-
- ccfgs.add(ccfg);
- }
-
return ccfgs;
}
@@ -4903,7 +4888,6 @@ public class CacheSerializableTransactionsTest extends GridCommonAbstractTest {
", near=" + (ccfg.getNearConfiguration() != null) +
", store=" + ccfg.isWriteThrough() +
", evictPlc=" + (ccfg.getEvictionPolicy() != null) +
- ", maxOffheap=" + ccfg.getOffHeapMaxMemory() +
']');
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/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 9a9b675..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheSwapUnswapGetTest.java
+++ /dev/null
@@ -1,310 +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<Integer, String> cacheConfiguration(CacheAtomicityMode atomicityMode,
- CacheMemoryMode memMode,
- boolean swap) {
- CacheConfiguration<Integer, String> 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 testTxCacheOffheapTiered() throws Exception {
- swapUnswap(TRANSACTIONAL, CacheMemoryMode.OFFHEAP_TIERED, false);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testTxCacheOffheapSwapEvict() throws Exception {
- swapUnswap(TRANSACTIONAL, CacheMemoryMode.ONHEAP_TIERED, true);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testTxCacheOffheapTieredSwapEvict() throws Exception {
- swapUnswap(TRANSACTIONAL, CacheMemoryMode.OFFHEAP_TIERED, true);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testAtomicCacheOffheapEvict() throws Exception {
- swapUnswap(ATOMIC, CacheMemoryMode.ONHEAP_TIERED, false);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testAtomicCacheOffheapTiered() throws Exception {
- swapUnswap(ATOMIC, CacheMemoryMode.OFFHEAP_TIERED, false);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testAtomicCacheOffheapSwapEvict() throws Exception {
- swapUnswap(ATOMIC, CacheMemoryMode.ONHEAP_TIERED, true);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testAtomicCacheOffheapTieredSwapEvict() throws Exception {
- swapUnswap(ATOMIC, CacheMemoryMode.OFFHEAP_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<Integer> keys = new ConcurrentHashSet<>();
-
- final AtomicBoolean done = new AtomicBoolean();
-
- g.destroyCache(null);
-
- final IgniteCache<Integer, String> 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<Void>() {
- @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 swapSize = cache.localSize(CachePeekMode.SWAP);
- int total = cache.localSize();
- long offheapMem = cache.localMetrics().getOffHeapAllocatedSize();
-
- log.info("Cache size [heap=" + onheapSize +
- ", offheap=" + offheapSize +
- ", swap=" + swapSize +
- ", total=" + total +
- ", offheapMem=" + offheapMem + ']');
-
- assertTrue(total > 0);
-
- assertEquals(onheapSize + offheapSize + swapSize, total);
-
- if (memMode == CacheMemoryMode.OFFHEAP_TIERED)
- assertEquals(0, onheapSize);
- else
- assertEquals(MAX_HEAP_SIZE, onheapSize);
-
- if (swap) {
- assertTrue(swapSize > 0);
- assertTrue(offheapMem <= OFFHEAP_MEM);
- }
- else
- assertEquals(0, swapSize);
- }
- finally {
- done.set(true);
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/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 0812fcc..52c98c2 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
@@ -27,7 +27,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;
@@ -102,11 +101,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/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractByteArrayValuesSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractByteArrayValuesSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractByteArrayValuesSelfTest.java
index abbf98d..fb8cc22 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractByteArrayValuesSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractByteArrayValuesSelfTest.java
@@ -30,12 +30,6 @@ public abstract class GridCacheAbstractByteArrayValuesSelfTest extends GridCommo
/** Regular cache name. */
protected static final String CACHE_REGULAR = "cache";
- /** Offheap cache name. */
- protected static final String CACHE_OFFHEAP = "cache_offheap";
-
- /** Offheap tiered cache name. */
- protected static final String CACHE_OFFHEAP_TIERED = "cache_offheap_tiered";
-
/** Key 1. */
protected static final Integer KEY_1 = 1;
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/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 de0b532..b70ca6a 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,14 +107,10 @@ 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.OFFHEAP_TIERED;
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_VALUES;
-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;
import static org.apache.ignite.cache.CachePeekMode.ALL;
-import static org.apache.ignite.cache.CachePeekMode.BACKUP;
import static org.apache.ignite.cache.CachePeekMode.OFFHEAP;
import static org.apache.ignite.cache.CachePeekMode.ONHEAP;
import static org.apache.ignite.cache.CachePeekMode.PRIMARY;
@@ -203,13 +198,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);
@@ -237,18 +225,6 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
}
/** {@inheritDoc} */
- @Override protected CacheConfiguration cacheConfiguration(String igniteInstanceName) throws Exception {
- CacheConfiguration ccfg = super.cacheConfiguration(igniteInstanceName);
-
- if (memoryMode() == OFFHEAP_TIERED || memoryMode() == OFFHEAP_VALUES) {
- ccfg.setMemoryMode(memoryMode());
- ccfg.setOffHeapMaxMemory(0);
- }
-
- return ccfg;
- }
-
- /** {@inheritDoc} */
@Override protected void beforeTestsStarted() throws Exception {
initStoreStrategy();
@@ -3133,8 +3109,8 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
*
* @throws Exception If failed.
*/
- public void _testDeletedEntriesFlag() throws Exception {
- if (cacheMode() != LOCAL && cacheMode() != REPLICATED && memoryMode() != OFFHEAP_TIERED) {
+ public void testDeletedEntriesFlag() throws Exception {
+ if (cacheMode() != LOCAL && cacheMode() != REPLICATED) {
final int cnt = 3;
IgniteCache<String, Integer> cache = jcache();
@@ -4060,7 +4036,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
* TODO GG-11133.
* @throws Exception In case of error.
*/
- public void _testEvictExpired() throws Exception {
+ public void testEvictExpired() throws Exception {
final IgniteCache<String, Integer> cache = jcache();
final String key = primaryKeysForCache(cache, 1).get(0);
@@ -4115,7 +4091,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
*
* @throws Exception If failed.
*/
- public void _testPeekExpired() throws Exception {
+ public void testPeekExpired() throws Exception {
final IgniteCache<String, Integer> c = jcache();
final String key = primaryKeysForCache(c, 1).get(0);
@@ -4150,7 +4126,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
*
* @throws Exception If failed.
*/
- public void _testPeekExpiredTx() throws Exception {
+ public void testPeekExpiredTx() throws Exception {
if (txShouldBeUsed()) {
final IgniteCache<String, Integer> c = jcache();
@@ -4209,9 +4185,6 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
if (true)
return;
- if (memoryMode() == OFFHEAP_TIERED)
- return;
-
int ttl = 1000;
final ExpiryPolicy expiry = new TouchedExpiryPolicy(new Duration(MILLISECONDS, ttl));
@@ -4493,144 +4466,6 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
}
/**
- * @throws Exception If failed.
- *
- * TODO: GG-11148 check if test makes sense.
- */
- public void _testUnswap() throws Exception {
- IgniteCache<String, Integer> cache = grid(0).cache(null);
-
- List<String> keys = primaryKeysForCache(jcache(), 3);
-
- String k1 = keys.get(0);
- String k2 = keys.get(1);
- String k3 = keys.get(2);
-
- cache.getAndPut(k1, 1);
- cache.getAndPut(k2, 2);
- cache.getAndPut(k3, 3);
-
- final AtomicInteger swapEvts = new AtomicInteger(0);
- final AtomicInteger unswapEvts = new AtomicInteger(0);
-
- Collection<String> locKeys = new HashSet<>();
-
- if (grid(0).context().cache().cache(null).context().affinityNode()) {
- Iterable<Cache.Entry<String, Integer>> entries = cache.localEntries(PRIMARY, BACKUP);
-
- for (Cache.Entry<String, Integer> entry : entries)
- locKeys.add(entry.getKey());
-
- info("Local keys (primary + backup): " + locKeys);
- }
-
- for (int i = 0; i < gridCount(); i++)
- grid(i).events().localListen(
- new SwapEvtsLocalListener(swapEvts, unswapEvts), EVT_CACHE_OBJECT_SWAPPED, EVT_CACHE_OBJECT_UNSWAPPED);
-
- cache.localEvict(F.asList(k2, k3));
-
- if (memoryMode() == OFFHEAP_TIERED) {
- assertNotNull(cache.localPeek(k1, ONHEAP, OFFHEAP));
- assertNotNull(cache.localPeek(k2, ONHEAP, OFFHEAP));
- assertNotNull(cache.localPeek(k3, ONHEAP, OFFHEAP));
- }
- else {
- assertNotNull(cache.localPeek(k1, ONHEAP, OFFHEAP));
- assertNull(cache.localPeek(k2, ONHEAP, OFFHEAP));
- assertNull(cache.localPeek(k3, ONHEAP, OFFHEAP));
- }
-
- int cnt = 0;
-
- if (locKeys.contains(k2)) {
- assertNull(cache.localPeek(k2, ONHEAP_PEEK_MODES));
-
- cache.localPromote(Collections.singleton(k2));
-
- assertEquals((Integer)2, cache.localPeek(k2, ONHEAP_PEEK_MODES));
-
- cnt++;
- }
- else {
- cache.localPromote(Collections.singleton(k2));
-
- assertNull(cache.localPeek(k2, ONHEAP_PEEK_MODES));
- }
-
- if (locKeys.contains(k3)) {
- assertNull(cache.localPeek(k3, ONHEAP_PEEK_MODES));
-
- cache.localPromote(Collections.singleton(k3));
-
- assertEquals((Integer)3, cache.localPeek(k3, ONHEAP_PEEK_MODES));
-
- cnt++;
- }
- else {
- cache.localPromote(Collections.singleton(k3));
-
- assertNull(cache.localPeek(k3, ONHEAP_PEEK_MODES));
- }
-
- if (memoryMode() != OFFHEAP_TIERED) {
- assertEquals(cnt, swapEvts.get());
- assertEquals(cnt, unswapEvts.get());
- }
-
- cache.localEvict(Collections.singleton(k1));
-
- assertEquals((Integer)1, cache.get(k1));
-
- if (locKeys.contains(k1))
- cnt++;
-
- if (memoryMode() != OFFHEAP_TIERED) {
- assertEquals(cnt, swapEvts.get());
- assertEquals(cnt, unswapEvts.get());
- }
-
- cache.clear();
-
- // Check with multiple arguments.
- cache.getAndPut(k1, 1);
- cache.getAndPut(k2, 2);
- cache.getAndPut(k3, 3);
-
- swapEvts.set(0);
- unswapEvts.set(0);
-
- cache.localEvict(Collections.singleton(k2));
- cache.localEvict(Collections.singleton(k3));
-
- if (memoryMode() == OFFHEAP_TIERED) {
- assertNotNull(cache.localPeek(k1, ONHEAP, OFFHEAP));
- assertNotNull(cache.localPeek(k2, ONHEAP, OFFHEAP));
- assertNotNull(cache.localPeek(k3, ONHEAP, OFFHEAP));
- }
- else {
- assertNotNull(cache.localPeek(k1, ONHEAP, OFFHEAP));
- assertNull(cache.localPeek(k2, ONHEAP, OFFHEAP));
- assertNull(cache.localPeek(k3, ONHEAP, OFFHEAP));
- }
-
- cache.localPromote(F.asSet(k2, k3));
-
- cnt = 0;
-
- if (locKeys.contains(k2))
- cnt++;
-
- if (locKeys.contains(k3))
- cnt++;
-
- if (memoryMode() != OFFHEAP_TIERED) {
- assertEquals(cnt, swapEvts.get());
- assertEquals(cnt, unswapEvts.get());
- }
- }
-
- /**
* JUnit.
*/
public void testCacheProxy() {
@@ -4644,7 +4479,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
*
* @throws Exception If failed.
*/
- public void _testCompactExpired() throws Exception {
+ public void testCompactExpired() throws Exception {
final IgniteCache<String, Integer> cache = jcache();
final String key = F.first(primaryKeysForCache(cache, 1));
@@ -4835,9 +4670,6 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
public void testToMap() throws Exception {
IgniteCache<String, Integer> cache = jcache();
- if (offheapTiered(cache))
- return;
-
cache.put("key1", 1);
cache.put("key2", 2);
@@ -4858,9 +4690,6 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
* @throws Exception If failed.
*/
protected void checkSize(final Collection<String> keys) throws Exception {
- if (memoryMode() == OFFHEAP_TIERED)
- return;
-
if (nearEnabled())
assertEquals(keys.size(), jcache().localSize(CachePeekMode.ALL));
else {
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/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 a294196..64c60fe 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;
@@ -64,7 +63,6 @@ import org.jetbrains.annotations.Nullable;
import static org.apache.ignite.IgniteSystemProperties.IGNITE_LOCAL_STORE_KEEPS_PRIMARY_ONLY;
import static org.apache.ignite.cache.CacheAtomicWriteOrderMode.PRIMARY;
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
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;
@@ -194,10 +192,6 @@ public abstract class GridCacheAbstractLocalStoreSelfTest extends GridCommonAbst
cacheCfg.setWriteThrough(true);
cacheCfg.setReadThrough(true);
cacheCfg.setBackups(backups);
- cacheCfg.setOffHeapMaxMemory(0);
-
- if (isOffHeapTieredMode())
- cacheCfg.setMemoryMode(OFFHEAP_TIERED);
return cacheCfg;
}
@@ -219,13 +213,6 @@ public abstract class GridCacheAbstractLocalStoreSelfTest extends GridCommonAbst
*/
protected abstract CacheMode getCacheMode();
- /**
- * @return {@code True} if {@link CacheMemoryMode#OFFHEAP_TIERED} memory mode should be used.
- */
- protected boolean isOffHeapTieredMode() {
- return false;
- }
-
/** {@inheritDoc} */
@Override protected void afterTestsStopped() throws Exception {
stopAllGrids();
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/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<Integer, Integer> sndCache0 = grid(0).createCache(ccfg);
final AtomicBoolean stop = new AtomicBoolean();
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractSelfTest.java
index c758ec1..95f8bb8 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractSelfTest.java
@@ -58,7 +58,6 @@ import org.apache.ignite.transactions.Transaction;
import org.jetbrains.annotations.Nullable;
import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
import static org.apache.ignite.cache.CacheMode.PARTITIONED;
import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
@@ -143,7 +142,7 @@ public abstract class GridCacheAbstractSelfTest extends GridCommonAbstractTest {
assertTrue(
"Cache is not empty: " + " localSize = " + jcache(fi).localSize(CachePeekMode.ALL)
- + ", local entries " + entrySet(jcache(fi).localEntries()),
+ + ", local entries " + entrySet(jcache(fi).localEntries()),
GridTestUtils.waitForCondition(
// Preloading may happen as nodes leave, so we need to wait.
new GridAbsPredicateX() {
@@ -251,6 +250,7 @@ public abstract class GridCacheAbstractSelfTest extends GridCommonAbstractTest {
cfg.setAtomicityMode(atomicityMode());
cfg.setWriteSynchronizationMode(writeSynchronization());
cfg.setNearConfiguration(nearConfiguration());
+ cfg.setOnheapCacheEnabled(onheapCacheEnabled());
Class<?>[] idxTypes = indexedTypes();
@@ -335,6 +335,13 @@ public abstract class GridCacheAbstractSelfTest extends GridCommonAbstractTest {
}
/**
+ * @return {@code True} if on-heap cache is enabled.
+ */
+ protected boolean onheapCacheEnabled() {
+ return false;
+ }
+
+ /**
* @return {@code True} for partitioned caches.
*/
protected final boolean partitionedMode() {
@@ -387,14 +394,6 @@ public abstract class GridCacheAbstractSelfTest extends GridCommonAbstractTest {
}
/**
- * @param cache Cache.
- * @return {@code True} if cache has OFFHEAP_TIERED memory mode.
- */
- protected <K, V> boolean offheapTiered(IgniteCache<K, V> cache) {
- return cache.getConfiguration(CacheConfiguration.class).getMemoryMode() == OFFHEAP_TIERED;
- }
-
- /**
* Executes regular peek or peek from swap.
*
* @param cache Cache projection.
@@ -413,7 +412,7 @@ public abstract class GridCacheAbstractSelfTest extends GridCommonAbstractTest {
*/
@SuppressWarnings("unchecked")
protected boolean containsKey(IgniteCache cache, Object key) throws Exception {
- return offheapTiered(cache) ? cache.localPeek(key, CachePeekMode.OFFHEAP) != null : cache.containsKey(key);
+ return cache.containsKey(key);
}
/**
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/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 796268d..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,177 +79,92 @@ public class GridCacheClearSelfTest extends GridCommonAbstractTest {
* @throws Exception If failed.
*/
public void testClearPartitioned() throws Exception {
- testClear(CacheMode.PARTITIONED, CacheMemoryMode.ONHEAP_TIERED, false, null);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testClearPartitionedOffHeap() throws Exception {
- testClear(CacheMode.PARTITIONED, CacheMemoryMode.OFFHEAP_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);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testClearPartitionedOffHeapNear() throws Exception {
- testClear(CacheMode.PARTITIONED, CacheMemoryMode.OFFHEAP_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);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testClearReplicatedOffHeap() throws Exception {
- testClear(CacheMode.REPLICATED, CacheMemoryMode.OFFHEAP_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);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testClearReplicatedOffHeapNear() throws Exception {
- testClear(CacheMode.REPLICATED, CacheMemoryMode.OFFHEAP_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));
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testClearKeyPartitionedOffHeap() throws Exception {
- testClear(CacheMode.PARTITIONED, CacheMemoryMode.OFFHEAP_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));
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testClearKeyPartitionedOffHeapNear() throws Exception {
- testClear(CacheMode.PARTITIONED, CacheMemoryMode.OFFHEAP_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));
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testClearKeyReplicatedOffHeap() throws Exception {
- testClear(CacheMode.REPLICATED, CacheMemoryMode.OFFHEAP_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));
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testClearKeyReplicatedOffHeapNear() throws Exception {
- testClear(CacheMode.REPLICATED, CacheMemoryMode.OFFHEAP_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));
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testClearKeysPartitionedOffHeap() throws Exception {
- testClear(CacheMode.PARTITIONED, CacheMemoryMode.OFFHEAP_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));
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testClearKeysPartitionedOffHeapNear() throws Exception {
- testClear(CacheMode.PARTITIONED, CacheMemoryMode.OFFHEAP_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));
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testClearKeysReplicatedOffHeap() throws Exception {
- testClear(CacheMode.REPLICATED, CacheMemoryMode.OFFHEAP_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));
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testClearKeysReplicatedOffHeapNear() throws Exception {
- testClear(CacheMode.REPLICATED, CacheMemoryMode.OFFHEAP_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<Integer> keys) {
+ private void testClear(CacheMode cacheMode, boolean near, @Nullable Set<Integer> keys) {
Ignite client1 = client1();
Ignite client2 = client2();
@@ -261,7 +175,6 @@ public class GridCacheClearSelfTest extends GridCommonAbstractTest {
CacheConfiguration<Integer, Integer> cfg = new CacheConfiguration<>(cacheName);
cfg.setCacheMode(cacheMode);
- cfg.setMemoryMode(memMode);
IgniteCache<Integer, Integer> cache1 = near ?
client1.createCache(cfg, new NearCacheConfiguration<Integer, Integer>()) :
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentTxMultiNodeTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentTxMultiNodeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentTxMultiNodeTest.java
index 491abff..4776456 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentTxMultiNodeTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentTxMultiNodeTest.java
@@ -144,7 +144,7 @@ public class GridCacheConcurrentTxMultiNodeTest extends GridCommonAbstractTest {
plc.setMaxSize(1000);
cc.setEvictionPolicy(plc);
- cc.setEvictSynchronized(false);
+ cc.setOnheapCacheEnabled(true);
cc.setWriteSynchronizationMode(FULL_SYNC);
cc.setRebalanceMode(NONE);
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConfigurationConsistencySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConfigurationConsistencySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConfigurationConsistencySelfTest.java
index 74c5348..59a5ebb 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConfigurationConsistencySelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConfigurationConsistencySelfTest.java
@@ -362,6 +362,7 @@ public class GridCacheConfigurationConsistencySelfTest extends GridCommonAbstrac
/** {@inheritDoc} */
@Override public Void apply(CacheConfiguration cfg) {
cfg.setEvictionPolicy(new FifoEvictionPolicy());
+ cfg.setOnheapCacheEnabled(true);
return null;
}
},
@@ -383,6 +384,7 @@ public class GridCacheConfigurationConsistencySelfTest extends GridCommonAbstrac
/** {@inheritDoc} */
@Override public Void apply(CacheConfiguration cfg) {
cfg.setEvictionPolicy(new SortedEvictionPolicy());
+ cfg.setOnheapCacheEnabled(true);
return null;
}
},
@@ -390,6 +392,7 @@ public class GridCacheConfigurationConsistencySelfTest extends GridCommonAbstrac
/** {@inheritDoc} */
@Override public Void apply(CacheConfiguration cfg) {
cfg.setEvictionPolicy(new FifoEvictionPolicy());
+ cfg.setOnheapCacheEnabled(true);
return null;
}
}
@@ -443,42 +446,6 @@ public class GridCacheConfigurationConsistencySelfTest extends GridCommonAbstrac
/**
* @throws Exception If failed.
*/
- public void testDifferentEvictSynchronized() throws Exception {
- cacheMode = PARTITIONED;
-
- checkSecondGridStartFails(
- new C1<CacheConfiguration, Void>() {
- /** {@inheritDoc} */
- @Override public Void apply(CacheConfiguration cfg) {
- cfg.setEvictSynchronized(true);
-
- FifoEvictionPolicy plc = new FifoEvictionPolicy();
-
- plc.setMaxSize(100);
-
- cfg.setEvictionPolicy(plc);
- return null;
- }
- },
- new C1<CacheConfiguration, Void>() {
- /** {@inheritDoc} */
- @Override public Void apply(CacheConfiguration cfg) {
- cfg.setEvictSynchronized(false);
-
- FifoEvictionPolicy plc = new FifoEvictionPolicy();
-
- plc.setMaxSize(100);
-
- cfg.setEvictionPolicy(plc);
- return null;
- }
- }
- );
- }
-
- /**
- * @throws Exception If failed.
- */
public void testDifferentAtomicity() throws Exception {
cacheMode = PARTITIONED;
@@ -672,6 +639,7 @@ public class GridCacheConfigurationConsistencySelfTest extends GridCommonAbstrac
cfg.setAffinity(new TestRendezvousAffinityFunction());
cfg.setEvictionPolicy(new FifoEvictionPolicy());
+ cfg.setOnheapCacheEnabled(true);
cfg.setCacheStoreFactory(new IgniteCacheAbstractTest.TestStoreFactory());
cfg.setReadThrough(true);
@@ -690,6 +658,7 @@ public class GridCacheConfigurationConsistencySelfTest extends GridCommonAbstrac
cfg.setAffinity(new RendezvousAffinityFunction());
cfg.setEvictionPolicy(new LruEvictionPolicy());
+ cfg.setOnheapCacheEnabled(true);
cfg.setCacheStoreFactory(null);
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentOffHeapSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentOffHeapSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentOffHeapSelfTest.java
deleted file mode 100644
index ed58c3e..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentOffHeapSelfTest.java
+++ /dev/null
@@ -1,41 +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 org.apache.ignite.configuration.CacheConfiguration;
-import org.apache.ignite.configuration.NearCacheConfiguration;
-
-import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
-
-/**
- * Tests deployment with off-heap storage.
- */
-public class GridCacheDeploymentOffHeapSelfTest extends GridCacheDeploymentSelfTest {
- /** {@inheritDoc} */
- @Override protected CacheConfiguration cacheConfiguration() throws Exception {
- CacheConfiguration cacheCfg = super.cacheConfiguration();
-
- cacheCfg.setMemoryMode(OFFHEAP_TIERED);
- cacheCfg.setOffHeapMaxMemory(0);
- cacheCfg.setAtomicityMode(TRANSACTIONAL);
- cacheCfg.setNearConfiguration(new NearCacheConfiguration());
-
- return cacheCfg;
- }
-}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentOffHeapValuesSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentOffHeapValuesSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentOffHeapValuesSelfTest.java
deleted file mode 100644
index 73d5183..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentOffHeapValuesSelfTest.java
+++ /dev/null
@@ -1,41 +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 org.apache.ignite.configuration.CacheConfiguration;
-import org.apache.ignite.configuration.NearCacheConfiguration;
-
-import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_VALUES;
-
-/**
- * Tests deployment with off-heap storage.
- */
-public class GridCacheDeploymentOffHeapValuesSelfTest extends GridCacheDeploymentSelfTest {
- /** {@inheritDoc} */
- @Override protected CacheConfiguration cacheConfiguration() throws Exception {
- CacheConfiguration cacheCfg = super.cacheConfiguration();
-
- cacheCfg.setMemoryMode(OFFHEAP_VALUES);
- cacheCfg.setOffHeapMaxMemory(0);
- cacheCfg.setAtomicityMode(TRANSACTIONAL);
- cacheCfg.setNearConfiguration(new NearCacheConfiguration());
-
- return cacheCfg;
- }
-}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionEventAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionEventAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionEventAbstractTest.java
index 40de38c..eae8dad 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionEventAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionEventAbstractTest.java
@@ -25,6 +25,7 @@ import org.apache.ignite.Ignite;
import org.apache.ignite.IgniteCache;
import org.apache.ignite.cache.CacheAtomicityMode;
import org.apache.ignite.cache.CacheMode;
+import org.apache.ignite.cache.eviction.fifo.FifoEvictionPolicy;
import org.apache.ignite.configuration.CacheConfiguration;
import org.apache.ignite.configuration.IgniteConfiguration;
import org.apache.ignite.events.CacheEvent;
@@ -69,6 +70,8 @@ public abstract class GridCacheEvictionEventAbstractTest extends GridCommonAbstr
cc.setCacheMode(cacheMode());
cc.setAtomicityMode(atomicityMode());
+ cc.setEvictionPolicy(new FifoEvictionPolicy());
+ cc.setOnheapCacheEnabled(true);
c.setCacheConfiguration(cc);
@@ -116,7 +119,5 @@ public abstract class GridCacheEvictionEventAbstractTest extends GridCommonAbstr
c.localEvict(Collections.singleton("1"));
assertTrue("Failed to wait for eviction event", latch.await(10, TimeUnit.SECONDS));
-
- assertNotNull(oldVal.get());
}
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheInterceptorAtomicOffheapRebalanceTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheInterceptorAtomicOffheapRebalanceTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheInterceptorAtomicOffheapRebalanceTest.java
deleted file mode 100644
index 103322f..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheInterceptorAtomicOffheapRebalanceTest.java
+++ /dev/null
@@ -1,30 +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 org.apache.ignite.cache.CacheMemoryMode;
-
-/**
- *
- */
-public class GridCacheInterceptorAtomicOffheapRebalanceTest extends GridCacheInterceptorAtomicRebalanceTest {
- /** {@inheritDoc} */
- @Override protected CacheMemoryMode memoryMode() {
- return CacheMemoryMode.OFFHEAP_TIERED;
- }
-}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/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/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheInterceptorTransactionalOffheapRebalanceTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheInterceptorTransactionalOffheapRebalanceTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheInterceptorTransactionalOffheapRebalanceTest.java
deleted file mode 100644
index bb90062..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheInterceptorTransactionalOffheapRebalanceTest.java
+++ /dev/null
@@ -1,35 +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 org.apache.ignite.cache.CacheMemoryMode;
-
-/**
- *
- */
-public class GridCacheInterceptorTransactionalOffheapRebalanceTest extends GridCacheInterceptorTransactionalRebalanceTest {
- /** {@inheritDoc} */
- @Override protected CacheMemoryMode memoryMode() {
- return CacheMemoryMode.OFFHEAP_TIERED;
- }
-
- /** {@inheritDoc} */
- @Override protected long getTestTimeout() {
- return 10 * 60_000;
- }
-}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/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/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheLifecycleAwareSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheLifecycleAwareSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheLifecycleAwareSelfTest.java
index 089e278..22d94fb 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheLifecycleAwareSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheLifecycleAwareSelfTest.java
@@ -318,6 +318,7 @@ public class GridCacheLifecycleAwareSelfTest extends GridAbstractLifecycleAwareS
TestEvictionPolicy evictionPlc = new TestEvictionPolicy();
ccfg.setEvictionPolicy(evictionPlc);
+ ccfg.setOnheapCacheEnabled(true);
lifecycleAwares.add(evictionPlc);
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMemoryModeSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMemoryModeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMemoryModeSelfTest.java
deleted file mode 100644
index 6768a0e..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMemoryModeSelfTest.java
+++ /dev/null
@@ -1,285 +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.HashMap;
-import java.util.Map;
-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.CacheMode;
-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.util.typedef.CIX1;
-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.junits.common.GridCommonAbstractTest;
-import org.junit.Assert;
-
-import static java.lang.String.valueOf;
-import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
-
-/**
- * Memory model self test.
- */
-@SuppressWarnings("deprecation")
-public class GridCacheMemoryModeSelfTest extends GridCommonAbstractTest {
- /** */
- private TcpDiscoveryIpFinder ipFinder;
-
- /** */
- private boolean swapEnabled;
-
- /** */
- private CacheMode mode;
-
- /** */
- private CacheMemoryMode memoryMode;
-
- /** */
- private int maxOnheapSize;
-
- /** */
- private long offheapSize;
-
- /** */
- private CacheAtomicityMode atomicity;
-
- /** {@inheritDoc} */
- @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
- IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
-
- TcpDiscoverySpi disco = new TcpDiscoverySpi();
-
- disco.setIpFinder(ipFinder);
-
- cfg.setDiscoverySpi(disco);
-
- cfg.setNetworkTimeout(2000);
-
- cfg.setCacheConfiguration(cacheConfiguration());
-
- return cfg;
- }
-
- /**
- * Returns cache configuration.
- *
- * @return cache configuration.
- */
- protected CacheConfiguration cacheConfiguration() {
- CacheConfiguration cacheCfg = defaultCacheConfiguration();
-
- cacheCfg.setWriteSynchronizationMode(FULL_SYNC);
-
- cacheCfg.setCacheMode(mode);
- cacheCfg.setMemoryMode(memoryMode);
-
- LruEvictionPolicy plc = null;
-
- if (maxOnheapSize != Integer.MAX_VALUE) {
- plc = new LruEvictionPolicy();
- plc.setMaxSize(maxOnheapSize);
- }
-
- cacheCfg.setEvictionPolicy(plc);
-
- cacheCfg.setAtomicityMode(atomicity);
- cacheCfg.setOffHeapMaxMemory(offheapSize);
-
- return cacheCfg;
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testOnheap() throws Exception {
- mode = CacheMode.LOCAL;
- memoryMode = CacheMemoryMode.ONHEAP_TIERED;
- maxOnheapSize = Integer.MAX_VALUE;
- swapEnabled = false;
- atomicity = CacheAtomicityMode.ATOMIC;
- offheapSize = -1;
-
- doTestPutAndPutAll(1000, 0, true, true);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testOnheapSwap() throws Exception {
- mode = CacheMode.LOCAL;
- memoryMode = CacheMemoryMode.ONHEAP_TIERED;
- maxOnheapSize = 330;
- swapEnabled = true;
- atomicity = CacheAtomicityMode.ATOMIC;
- offheapSize = -1;
-
- doTestPutAndPutAll(330, 670, true, false);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testOffheap() throws Exception {
- mode = CacheMode.LOCAL;
- memoryMode = CacheMemoryMode.OFFHEAP_TIERED;
- maxOnheapSize = Integer.MAX_VALUE;
- swapEnabled = false;
- atomicity = CacheAtomicityMode.ATOMIC;
- offheapSize = -1; // Must be fixed in config validation.
-
- doTestPutAndPutAll(0, 1000, false, true);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testOffheapSwap() throws Exception {
- mode = CacheMode.LOCAL;
- memoryMode = CacheMemoryMode.OFFHEAP_TIERED;
- maxOnheapSize = Integer.MAX_VALUE;
- swapEnabled = true;
- atomicity = CacheAtomicityMode.ATOMIC;
- offheapSize = 1000; // Small for evictions from offheap to swap.
-
- doTestPutAndPutAll(0, 1000, false, false);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testTiered() throws Exception {
- mode = CacheMode.LOCAL;
- memoryMode = CacheMemoryMode.ONHEAP_TIERED;
- maxOnheapSize = 24;
- swapEnabled = true;
- atomicity = CacheAtomicityMode.ATOMIC;
- offheapSize = 1000; // Small for evictions from offheap to swap.
-
- doTestPutAndPutAll(24, 976, false, false);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testOffheapValuesConfigFixBackward() throws Exception {
- mode = CacheMode.LOCAL;
- memoryMode = CacheMemoryMode.OFFHEAP_VALUES;
- maxOnheapSize = 24;
- swapEnabled = true;
- atomicity = CacheAtomicityMode.ATOMIC;
- offheapSize = -1;
-
- Ignite g = startGrid();
-
- CacheConfiguration cfg = g.cache(null).getConfiguration(CacheConfiguration.class);
-
- assertEquals(memoryMode, cfg.getMemoryMode());
- assertEquals(0, cfg.getOffHeapMaxMemory());
- }
-
- /** {@inheritDoc} */
- @Override protected void afterTest() throws Exception {
- super.afterTest();
-
- stopAllGrids();
- }
-
- /**
- * @param cache In cache.
- * @param offheapSwap In swap and offheap.
- * @param offheapEmpty Offheap is empty.
- * @param swapEmpty Swap is empty.
- * @throws Exception If failed.
- */
- private void doTestPutAndPutAll(int cache, int offheapSwap, boolean offheapEmpty, boolean swapEmpty)
- throws Exception {
- final int all = cache + offheapSwap;
-
- // put
- doTest(cache, offheapSwap, offheapEmpty, swapEmpty, new CIX1<IgniteCache<String, Integer>>() {
- @Override public void applyx(IgniteCache<String, Integer> c) throws IgniteCheckedException {
- for (int i = 0; i < all; i++)
- c.put(valueOf(i), i);
- }
- });
-
- //putAll
- doTest(cache, offheapSwap, offheapEmpty, swapEmpty, new CIX1<IgniteCache<String, Integer>>() {
- @Override public void applyx(IgniteCache<String, Integer> c) throws IgniteCheckedException {
- putAll(c, 0, all / 2);
-
- putAll(c, all / 2 + 1, all - 1);
- }
-
- private void putAll(IgniteCache<String, Integer> c, int k1, int k2) {
- Map<String, Integer> m = new HashMap<>();
-
- for (int i = k1; i <= k2; i++)
- m.put(valueOf(i), i);
-
- c.putAll(m);
- }
- });
- }
-
- /**
- * @param cache Cache size.
- * @param offheapSwap Offheap + swap size.
- * @param offheapEmpty Offheap is empty.
- * @param swapEmpty Swap is empty.
- * @param x Cache modifier.
- * @throws IgniteCheckedException If failed.
- */
- void doTest(int cache, int offheapSwap, boolean offheapEmpty, boolean swapEmpty,
- CIX1<IgniteCache<String, Integer>> x) throws Exception {
- ipFinder = new TcpDiscoveryVmIpFinder(true);
-
- startGrid();
-
- final IgniteCache<String, Integer> c = jcache();
-
- x.applyx(c);
-
- assertEquals(cache, c.size(CachePeekMode.ONHEAP));
- assertEquals(offheapSwap, c.localSize(CachePeekMode.OFFHEAP) + c.localSize(CachePeekMode.SWAP));
-
- info("size: " + c.size());
- info("heap: " + c.localSize(CachePeekMode.ONHEAP));
- info("offheap: " + c.localSize(CachePeekMode.OFFHEAP));
- info("swap: " + c.localSize(CachePeekMode.SWAP));
-
- if (offheapEmpty)
- Assert.assertEquals(0, c.localSize(CachePeekMode.OFFHEAP));
- else
- Assert.assertNotEquals(0, c.localSize(CachePeekMode.OFFHEAP));
-
- if (swapEmpty)
- Assert.assertEquals(0, c.localSize(CachePeekMode.SWAP));
- else
- Assert.assertNotEquals(0, c.localSize(CachePeekMode.SWAP));
-
- stopAllGrids();
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheObjectToStringSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheObjectToStringSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheObjectToStringSelfTest.java
index 98d5682..54a3aa9 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheObjectToStringSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheObjectToStringSelfTest.java
@@ -68,6 +68,7 @@ public class GridCacheObjectToStringSelfTest extends GridCommonAbstractTest {
cacheCfg.setCacheMode(cacheMode);
cacheCfg.setEvictionPolicy(evictionPlc);
+ cacheCfg.setOnheapCacheEnabled(true);
cacheCfg.setNearConfiguration(nearEnabled ? new NearCacheConfiguration() : null);
cacheCfg.setAtomicityMode(TRANSACTIONAL);
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapMultiThreadedUpdateAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapMultiThreadedUpdateAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapMultiThreadedUpdateAbstractSelfTest.java
index e83ec3a..a806b7f 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapMultiThreadedUpdateAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapMultiThreadedUpdateAbstractSelfTest.java
@@ -30,7 +30,6 @@ import org.apache.ignite.lang.IgnitePredicate;
import org.apache.ignite.testframework.GridTestUtils;
import static org.apache.ignite.cache.CacheAtomicWriteOrderMode.PRIMARY;
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
import static org.apache.ignite.cache.CacheMode.PARTITIONED;
import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
@@ -53,8 +52,6 @@ public abstract class GridCacheOffHeapMultiThreadedUpdateAbstractSelfTest extend
ccfg.setAtomicityMode(atomicityMode());
ccfg.setCacheMode(PARTITIONED);
ccfg.setBackups(1);
- ccfg.setMemoryMode(OFFHEAP_TIERED);
- ccfg.setOffHeapMaxMemory(1024 * 1024);
ccfg.setWriteSynchronizationMode(FULL_SYNC);
ccfg.setAtomicWriteOrderMode(PRIMARY);
[10/17] ignite git commit: IGNITE-4535 - Add option to store
deserialized values on-heap
Posted by ag...@apache.org.
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractNodeRestartSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractNodeRestartSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractNodeRestartSelfTest.java
index e2cf734..d268e47 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractNodeRestartSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractNodeRestartSelfTest.java
@@ -36,6 +36,7 @@ import org.apache.ignite.IgniteException;
import org.apache.ignite.IgniteTransactions;
import org.apache.ignite.cache.CacheAtomicityMode;
import org.apache.ignite.cache.CacheRebalanceMode;
+import org.apache.ignite.cache.eviction.lru.LruEvictionPolicy;
import org.apache.ignite.configuration.CacheConfiguration;
import org.apache.ignite.configuration.IgniteConfiguration;
import org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi;
@@ -100,6 +101,9 @@ public abstract class GridCacheAbstractNodeRestartSelfTest extends GridCommonAbs
protected CacheRebalanceMode rebalancMode = ASYNC;
/** */
+ protected boolean evict = false;
+
+ /** */
protected int rebalancBatchSize = DFLT_BATCH_SIZE;
/** Number of partitions. */
@@ -115,9 +119,6 @@ public abstract class GridCacheAbstractNodeRestartSelfTest extends GridCommonAbs
private int retries = DFLT_RETRIES;
/** */
- private GridTestUtils.TestMemoryMode memMode = GridTestUtils.TestMemoryMode.HEAP;
-
- /** */
private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true);
/** {@inheritDoc} */
@@ -139,7 +140,14 @@ public abstract class GridCacheAbstractNodeRestartSelfTest extends GridCommonAbs
CacheConfiguration ccfg = cacheConfiguration();
- GridTestUtils.setMemoryMode(c, ccfg, memMode, 100, 1024);
+ if (evict) {
+ LruEvictionPolicy plc = new LruEvictionPolicy();
+
+ plc.setMaxSize(100);
+
+ ccfg.setEvictionPolicy(plc);
+ ccfg.setOnheapCacheEnabled(true);
+ }
c.setCacheConfiguration(ccfg);
@@ -166,6 +174,7 @@ public abstract class GridCacheAbstractNodeRestartSelfTest extends GridCommonAbs
backups = DFLT_BACKUPS;
partitions = DFLT_PARTITIONS;
rebalancMode = ASYNC;
+ evict = false;
rebalancBatchSize = DFLT_BATCH_SIZE;
nodeCnt = DFLT_NODE_CNT;
keyCnt = DFLT_KEY_CNT;
@@ -188,7 +197,7 @@ public abstract class GridCacheAbstractNodeRestartSelfTest extends GridCommonAbs
/**
* @throws Exception If failed.
*/
- private void startGrids() throws Exception {
+ private void startGrids() throws Exception {
for (int i = 0; i < nodeCnt; i++) {
startGrid(i);
@@ -282,6 +291,7 @@ public abstract class GridCacheAbstractNodeRestartSelfTest extends GridCommonAbs
keyCnt = 10;
partitions = 29;
rebalancMode = ASYNC;
+ evict = false;
long duration = 30000;
@@ -297,6 +307,7 @@ public abstract class GridCacheAbstractNodeRestartSelfTest extends GridCommonAbs
keyCnt = 10;
partitions = 29;
rebalancMode = ASYNC;
+ evict = false;
long duration = 30000;
@@ -312,6 +323,7 @@ public abstract class GridCacheAbstractNodeRestartSelfTest extends GridCommonAbs
keyCnt = 10;
partitions = 29;
rebalancMode = ASYNC;
+ evict = false;
long duration = 30000;
@@ -327,6 +339,7 @@ public abstract class GridCacheAbstractNodeRestartSelfTest extends GridCommonAbs
keyCnt = 10;
partitions = 29;
rebalancMode = ASYNC;
+ evict = false;
long duration = 30000;
@@ -342,6 +355,7 @@ public abstract class GridCacheAbstractNodeRestartSelfTest extends GridCommonAbs
keyCnt = 10;
partitions = 29;
rebalancMode = ASYNC;
+ evict = false;
long duration = 60000;
@@ -357,6 +371,7 @@ public abstract class GridCacheAbstractNodeRestartSelfTest extends GridCommonAbs
keyCnt = 10;
partitions = 29;
rebalancMode = ASYNC;
+ evict = false;
long duration = 60000;
@@ -372,6 +387,7 @@ public abstract class GridCacheAbstractNodeRestartSelfTest extends GridCommonAbs
keyCnt = 10;
partitions = 29;
rebalancMode = ASYNC;
+ evict = false;
long duration = 60000;
@@ -381,52 +397,15 @@ public abstract class GridCacheAbstractNodeRestartSelfTest extends GridCommonAbs
/**
* @throws Exception If failed.
*/
- public void testRestartWithPutFourNodesOneBackupsSwap() throws Throwable {
- restartWithPutFourNodesOneBackupsWithMemoryMode(GridTestUtils.TestMemoryMode.SWAP);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testRestartWithPutFourNodesOneBackupsOffheapTiered() throws Throwable {
- restartWithPutFourNodesOneBackupsWithMemoryMode(GridTestUtils.TestMemoryMode.OFFHEAP_TIERED);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testRestartWithPutFourNodesOneBackupsOffheapTieredSwap() throws Throwable {
- restartWithPutFourNodesOneBackupsWithMemoryMode(GridTestUtils.TestMemoryMode.OFFHEAP_TIERED_SWAP);
- }
-
- /**
- * @throws Exception If failed.
- */
public void testRestartWithPutFourNodesOneBackupsOffheapEvict() throws Throwable {
- restartWithPutFourNodesOneBackupsWithMemoryMode(GridTestUtils.TestMemoryMode.OFFHEAP_EVICT);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testRestartWithPutFourNodesOneBackupsOffheapEvictSwap() throws Throwable {
- restartWithPutFourNodesOneBackupsWithMemoryMode(GridTestUtils.TestMemoryMode.OFFHEAP_EVICT_SWAP);
- }
-
- /**
- * @param memMode Memory mode.
- * @throws Throwable If failed.
- */
- private void restartWithPutFourNodesOneBackupsWithMemoryMode(GridTestUtils.TestMemoryMode memMode)
- throws Throwable {
backups = 1;
nodeCnt = 4;
- keyCnt = 100_000;
+ keyCnt = 10;
partitions = 29;
rebalancMode = ASYNC;
- this.memMode = memMode;
+ evict = true;
- long duration = 30_000;
+ long duration = 60000;
checkRestartWithPut(duration, 2, 2);
}
@@ -440,6 +419,7 @@ public abstract class GridCacheAbstractNodeRestartSelfTest extends GridCommonAbs
keyCnt = 10;
partitions = 29;
rebalancMode = ASYNC;
+ evict = false;
long duration = 60000;
@@ -449,49 +429,13 @@ public abstract class GridCacheAbstractNodeRestartSelfTest extends GridCommonAbs
/**
* @throws Exception If failed.
*/
- public void testRestartWithTxFourNodesOneBackupsSwap() throws Throwable {
- restartWithTxFourNodesOneBackupsWithMemoryMode(GridTestUtils.TestMemoryMode.SWAP);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testRestartWithTxFourNodesOneBackupsOffheapTiered() throws Throwable {
- restartWithTxFourNodesOneBackupsWithMemoryMode(GridTestUtils.TestMemoryMode.OFFHEAP_TIERED);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testRestartWithTxFourNodesOneBackupsOffheapTieredSwap() throws Throwable {
- restartWithTxFourNodesOneBackupsWithMemoryMode(GridTestUtils.TestMemoryMode.OFFHEAP_TIERED_SWAP);
- }
-
- /**
- * @throws Exception If failed.
- */
public void testRestartWithTxFourNodesOneBackupsOffheapEvict() throws Throwable {
- restartWithTxFourNodesOneBackupsWithMemoryMode(GridTestUtils.TestMemoryMode.OFFHEAP_EVICT);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testRestartWithTxFourNodesOneBackupsOffheapEvictSwap() throws Throwable {
- restartWithTxFourNodesOneBackupsWithMemoryMode(GridTestUtils.TestMemoryMode.OFFHEAP_EVICT_SWAP);
- }
-
- /**
- * @param memMode Memory mode.
- * @throws Throwable If failed.
- */
- private void restartWithTxFourNodesOneBackupsWithMemoryMode(GridTestUtils.TestMemoryMode memMode) throws Throwable {
backups = 1;
nodeCnt = 4;
keyCnt = 100_000;
partitions = 29;
rebalancMode = ASYNC;
- this.memMode = memMode;
+ evict = true;
long duration = 30_000;
@@ -507,6 +451,7 @@ public abstract class GridCacheAbstractNodeRestartSelfTest extends GridCommonAbs
keyCnt = 10;
partitions = 29;
rebalancMode = ASYNC;
+ evict = false;
long duration = 90000;
@@ -522,6 +467,7 @@ public abstract class GridCacheAbstractNodeRestartSelfTest extends GridCommonAbs
keyCnt = 10;
partitions = 29;
rebalancMode = ASYNC;
+ evict = false;
long duration = 90000;
@@ -537,6 +483,7 @@ public abstract class GridCacheAbstractNodeRestartSelfTest extends GridCommonAbs
keyCnt = 10;
partitions = 29;
rebalancMode = ASYNC;
+ evict = false;
long duration = 90000;
@@ -552,6 +499,7 @@ public abstract class GridCacheAbstractNodeRestartSelfTest extends GridCommonAbs
keyCnt = 10;
partitions = 29;
rebalancMode = ASYNC;
+ evict = false;
long duration = 90000;
@@ -567,6 +515,7 @@ public abstract class GridCacheAbstractNodeRestartSelfTest extends GridCommonAbs
keyCnt = 10;
partitions = 29;
rebalancMode = ASYNC;
+ evict = false;
long duration = 90000;
@@ -582,6 +531,7 @@ public abstract class GridCacheAbstractNodeRestartSelfTest extends GridCommonAbs
keyCnt = 10;
partitions = 29;
rebalancMode = ASYNC;
+ evict = false;
long duration = 90000;
@@ -597,6 +547,7 @@ public abstract class GridCacheAbstractNodeRestartSelfTest extends GridCommonAbs
keyCnt = 10;
partitions = 29;
rebalancMode = ASYNC;
+ evict = false;
long duration = 90000;
@@ -612,6 +563,7 @@ public abstract class GridCacheAbstractNodeRestartSelfTest extends GridCommonAbs
keyCnt = 10;
partitions = 29;
rebalancMode = ASYNC;
+ evict = false;
long duration = 90000;
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractPartitionedByteArrayValuesSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractPartitionedByteArrayValuesSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractPartitionedByteArrayValuesSelfTest.java
index ba412d7..16ebf7e 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractPartitionedByteArrayValuesSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractPartitionedByteArrayValuesSelfTest.java
@@ -23,8 +23,6 @@ import org.apache.ignite.configuration.NearCacheConfiguration;
import org.apache.ignite.configuration.TransactionConfiguration;
import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_VALUES;
import static org.apache.ignite.cache.CacheMode.PARTITIONED;
import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
@@ -55,37 +53,6 @@ public abstract class GridCacheAbstractPartitionedByteArrayValuesSelfTest extend
cfg.setNearConfiguration(nearConfiguration());
cfg.setBackups(1);
cfg.setWriteSynchronizationMode(FULL_SYNC);
- cfg.setEvictSynchronized(false);
-
- return cfg;
- }
-
- /** {@inheritDoc} */
- @Override protected CacheConfiguration offheapCacheConfiguration0() {
- CacheConfiguration cfg = new CacheConfiguration();
-
- cfg.setCacheMode(PARTITIONED);
- cfg.setAtomicityMode(TRANSACTIONAL);
- cfg.setNearConfiguration(nearConfiguration());
- cfg.setBackups(1);
- cfg.setWriteSynchronizationMode(FULL_SYNC);
- cfg.setMemoryMode(OFFHEAP_VALUES);
- cfg.setOffHeapMaxMemory(100 * 1024 * 1024);
-
- return cfg;
- }
-
- /** {@inheritDoc} */
- @Override protected CacheConfiguration offheapTieredCacheConfiguration0() {
- CacheConfiguration cfg = new CacheConfiguration();
-
- cfg.setCacheMode(PARTITIONED);
- cfg.setAtomicityMode(TRANSACTIONAL);
- cfg.setNearConfiguration(nearConfiguration());
- cfg.setBackups(1);
- cfg.setWriteSynchronizationMode(FULL_SYNC);
- cfg.setMemoryMode(OFFHEAP_TIERED);
- cfg.setOffHeapMaxMemory(100 * 1024 * 1024);
return cfg;
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheAtomicNodeRestartTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheAtomicNodeRestartTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheAtomicNodeRestartTest.java
index 37ed866..6b62912 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheAtomicNodeRestartTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheAtomicNodeRestartTest.java
@@ -35,9 +35,4 @@ public class IgniteCacheAtomicNodeRestartTest extends GridCachePartitionedNodeRe
@Override public void testRestartWithPutFourNodesNoBackups() {
fail("https://issues.apache.org/jira/browse/IGNITE-1587");
}
-
- /** {@inheritDoc} */
- @Override public void testRestartWithPutFourNodesOneBackupsOffheapTiered() {
- fail("https://issues.apache.org/jira/browse/IGNITE-1587");
- }
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheNearOffheapGetSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheNearOffheapGetSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheNearOffheapGetSelfTest.java
deleted file mode 100644
index 0635b2d..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheNearOffheapGetSelfTest.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.ignite.internal.processors.cache.distributed;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import org.apache.ignite.IgniteCache;
-import org.apache.ignite.IgniteState;
-import org.apache.ignite.Ignition;
-import org.apache.ignite.cache.CacheMemoryMode;
-import org.apache.ignite.cache.CacheMode;
-import org.apache.ignite.cache.affinity.Affinity;
-import org.apache.ignite.cache.eviction.fifo.FifoEvictionPolicy;
-import org.apache.ignite.configuration.CacheConfiguration;
-import org.apache.ignite.configuration.IgniteConfiguration;
-import org.apache.ignite.configuration.NearCacheConfiguration;
-import org.apache.ignite.internal.IgniteEx;
-import org.apache.ignite.internal.processors.cache.GridCacheAbstractSelfTest;
-
-import static org.apache.ignite.cache.CacheMode.PARTITIONED;
-
-/**
- *
- */
-public class IgniteCacheNearOffheapGetSelfTest extends GridCacheAbstractSelfTest {
- /** {@inheritDoc} */
- @Override protected int gridCount() {
- return 4;
- }
-
- /** {@inheritDoc} */
- @Override protected void beforeTestsStarted() throws Exception {
- super.beforeTestsStarted();
-
- if (nearEnabled())
- grid(gridCount() - 1).getOrCreateCache(new CacheConfiguration(), nearConfiguration());
- }
-
- /** {@inheritDoc} */
- @SuppressWarnings("unchecked")
- @Override protected NearCacheConfiguration nearConfiguration() {
- NearCacheConfiguration nearCfg = super.nearConfiguration();
-
- nearCfg.setNearEvictionPolicy(new FifoEvictionPolicy(100));
-
- return nearCfg;
- }
-
- /** {@inheritDoc} */
- @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
- IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
-
- if (getTestIgniteInstanceName(gridCount() - 1).equals(igniteInstanceName)) {
- cfg.setClientMode(true);
-
- cfg.setCacheConfiguration();
- }
-
- return cfg;
- }
-
- /** {@inheritDoc} */
- @SuppressWarnings("unchecked")
- @Override protected CacheConfiguration cacheConfiguration(String igniteInstanceName) throws Exception {
- CacheConfiguration cfg = super.cacheConfiguration(igniteInstanceName);
-
- cfg.setBackups(1);
- cfg.setMemoryMode(CacheMemoryMode.OFFHEAP_TIERED);
-
- return cfg;
- }
-
- /** {@inheritDoc} */
- @Override protected CacheMode cacheMode() {
- return PARTITIONED;
- }
-
- @Override
- protected long getTestTimeout() {
- return Long.MAX_VALUE;
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testGetFromNear() throws Exception {
-
- IgniteCache<Object, Object> nearOnly = ignite(gridCount() - 1).cache(null);
-
- // Start extra node.
- IgniteEx ignite = startGrid(gridCount());
-
- try {
- final int keyCnt = 30;
-
- for (int i = 0; i < keyCnt; i++)
- ignite(0).cache(null).put(i, i);
-
- for (int i = 0; i < keyCnt; i++)
- assertEquals(i, nearOnly.get(i));
-
- Collection<Integer> invalidatedKeys = new ArrayList<>();
-
- Affinity<Object> cacheAff = ignite.affinity(null);
-
- // Going to stop the last node.
- for (int i = 0; i < keyCnt; i++) {
- if (cacheAff.mapKeyToNode(i).equals(ignite.localNode()))
- invalidatedKeys.add(i);
- }
-
- stopGrid(gridCount());
-
- for (Integer key : invalidatedKeys)
- assertEquals(key, nearOnly.get(key));
- }
- finally {
- if (Ignition.state(getTestIgniteInstanceName(gridCount())) == IgniteState.STARTED)
- stopGrid(gridCount());
- }
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheTxIteratorSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheTxIteratorSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheTxIteratorSelfTest.java
index 2d9442c..cdf996d 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheTxIteratorSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheTxIteratorSelfTest.java
@@ -20,7 +20,6 @@ package org.apache.ignite.internal.processors.cache.distributed;
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.CacheWriteSynchronizationMode;
import org.apache.ignite.cache.eviction.fifo.FifoEvictionPolicy;
@@ -62,7 +61,6 @@ public class IgniteCacheTxIteratorSelfTest extends GridCommonAbstractTest {
private CacheConfiguration<String, TestClass> cacheConfiguration(
CacheMode mode,
CacheAtomicityMode atomMode,
- CacheMemoryMode memMode,
boolean nearEnabled,
boolean useEvictPlc
) {
@@ -70,15 +68,14 @@ public class IgniteCacheTxIteratorSelfTest extends GridCommonAbstractTest {
ccfg.setAtomicityMode(atomMode);
ccfg.setCacheMode(mode);
- ccfg.setMemoryMode(memMode);
ccfg.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC);
if (nearEnabled)
ccfg.setNearConfiguration(new NearCacheConfiguration<String, TestClass>());
- if (memMode == CacheMemoryMode.ONHEAP_TIERED && useEvictPlc) {
- ccfg.setOffHeapMaxMemory(10 * 1024 * 1024);
+ if (useEvictPlc) {
ccfg.setEvictionPolicy(new FifoEvictionPolicy(50));
+ ccfg.setOnheapCacheEnabled(true);
}
return ccfg;
@@ -107,17 +104,14 @@ public class IgniteCacheTxIteratorSelfTest extends GridCommonAbstractTest {
try {
for (CacheMode mode : CacheMode.values()) {
for (CacheAtomicityMode atomMode : CacheAtomicityMode.values()) {
- for (CacheMemoryMode memMode : CacheMemoryMode.values()) {
- if (mode == CacheMode.PARTITIONED) {
- // Near cache makes sense only for partitioned cache.
- checkTxCache(CacheMode.PARTITIONED, atomMode, memMode, true, false);
- }
+ if (mode == CacheMode.PARTITIONED) {
+ // Near cache makes sense only for partitioned cache.
+ checkTxCache(CacheMode.PARTITIONED, atomMode, true, false);
+ }
- if (memMode == CacheMemoryMode.ONHEAP_TIERED)
- checkTxCache(mode, atomMode, CacheMemoryMode.ONHEAP_TIERED, false, true);
+ checkTxCache(CacheMode.PARTITIONED, atomMode, false, true);
- checkTxCache(mode, atomMode, memMode, false, false);
- }
+ checkTxCache(CacheMode.PARTITIONED, atomMode, false, false);
}
}
}
@@ -132,7 +126,6 @@ public class IgniteCacheTxIteratorSelfTest extends GridCommonAbstractTest {
private void checkTxCache(
CacheMode mode,
CacheAtomicityMode atomMode,
- CacheMemoryMode memMode,
boolean nearEnabled,
boolean useEvicPlc
) throws Exception {
@@ -141,14 +134,13 @@ public class IgniteCacheTxIteratorSelfTest extends GridCommonAbstractTest {
final CacheConfiguration<String, TestClass> ccfg = cacheConfiguration(
mode,
atomMode,
- memMode,
nearEnabled,
useEvicPlc);
final IgniteCache<String, TestClass> cache = ignite.createCache(ccfg);
- info("Checking cache [mode=" + mode + ", atomMode=" + atomMode + ", memMode=" + memMode +
- ", near=" + nearEnabled + ']');
+ info("Checking cache [mode=" + mode + ", atomMode=" + atomMode + ", near=" + nearEnabled +
+ ", evict=" + useEvicPlc + ']');
try {
for (int i = 0; i < 30; i++) {
@@ -213,8 +205,10 @@ public class IgniteCacheTxIteratorSelfTest extends GridCommonAbstractTest {
*/
@Override
public boolean equals(final Object o) {
- if (this == o) return true;
- if (o == null || getClass() != o.getClass()) return false;
+ if (this == o)
+ return true;
+ if (o == null || getClass() != o.getClass())
+ return false;
final TestClass testCls = (TestClass)o;
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheAbstractPartitionedOnlyByteArrayValuesSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheAbstractPartitionedOnlyByteArrayValuesSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheAbstractPartitionedOnlyByteArrayValuesSelfTest.java
index 0151be5..affac28 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheAbstractPartitionedOnlyByteArrayValuesSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheAbstractPartitionedOnlyByteArrayValuesSelfTest.java
@@ -38,18 +38,9 @@ public abstract class GridCacheAbstractPartitionedOnlyByteArrayValuesSelfTest ex
/** Offheap cache name. */
protected static final String CACHE_ATOMIC_OFFHEAP = "cache_atomic_offheap";
- /** Offheap tiered cache name. */
- protected static final String CACHE_ATOMIC_OFFHEAP_TIERED = "cache_atomic_offheap_tiered";
-
/** Atomic caches. */
private static IgniteCache<Integer, Object>[] cachesAtomic;
- /** Atomic offheap caches. */
- private static IgniteCache<Integer, Object>[] cachesAtomicOffheap;
-
- /** Atomic offheap caches. */
- private static IgniteCache<Integer, Object>[] cachesAtomicOffheapTiered;
-
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration c = super.getConfiguration(igniteInstanceName);
@@ -60,24 +51,7 @@ public abstract class GridCacheAbstractPartitionedOnlyByteArrayValuesSelfTest ex
atomicCacheCfg.setAtomicityMode(ATOMIC);
atomicCacheCfg.setAtomicWriteOrderMode(PRIMARY);
- CacheConfiguration atomicOffheapCacheCfg = offheapCacheConfiguration0();
-
- atomicOffheapCacheCfg.setName(CACHE_ATOMIC_OFFHEAP);
- atomicOffheapCacheCfg.setAtomicityMode(ATOMIC);
- atomicOffheapCacheCfg.setAtomicWriteOrderMode(PRIMARY);
-
- CacheConfiguration atomicOffheapTieredCacheCfg = offheapTieredCacheConfiguration();
-
- atomicOffheapTieredCacheCfg.setName(CACHE_ATOMIC_OFFHEAP_TIERED);
- atomicOffheapTieredCacheCfg.setAtomicityMode(ATOMIC);
- atomicOffheapTieredCacheCfg.setAtomicWriteOrderMode(PRIMARY);
-
- c.setCacheConfiguration(cacheConfiguration(),
- offheapCacheConfiguration(),
- offheapTieredCacheConfiguration(),
- atomicCacheCfg,
- atomicOffheapCacheCfg,
- atomicOffheapTieredCacheCfg);
+ c.setCacheConfiguration(cacheConfiguration(), atomicCacheCfg);
c.setPeerClassLoadingEnabled(peerClassLoading());
@@ -97,21 +71,14 @@ public abstract class GridCacheAbstractPartitionedOnlyByteArrayValuesSelfTest ex
int gridCnt = gridCount();
cachesAtomic = new IgniteCache[gridCnt];
- cachesAtomicOffheap = new IgniteCache[gridCnt];
- cachesAtomicOffheapTiered = new IgniteCache[gridCnt];
- for (int i = 0; i < gridCount(); i++) {
+ for (int i = 0; i < gridCount(); i++)
cachesAtomic[i] = ignites[i].cache(CACHE_ATOMIC);
- cachesAtomicOffheap[i] = ignites[i].cache(CACHE_ATOMIC_OFFHEAP);
- cachesAtomicOffheapTiered[i] = ignites[i].cache(CACHE_ATOMIC_OFFHEAP_TIERED);
- }
}
/** {@inheritDoc} */
@Override protected void afterTestsStopped() throws Exception {
cachesAtomic = null;
- cachesAtomicOffheap = null;
- cachesAtomicOffheapTiered = null;
super.afterTestsStopped();
}
@@ -126,24 +93,6 @@ public abstract class GridCacheAbstractPartitionedOnlyByteArrayValuesSelfTest ex
}
/**
- * Test atomic offheap cache.
- *
- * @throws Exception If failed.
- */
- public void testAtomicOffheap() throws Exception {
- testAtomic0(cachesAtomicOffheap);
- }
-
- /**
- * Test atomic offheap cache.
- *
- * @throws Exception If failed.
- */
- public void testAtomicOffheapTiered() throws Exception {
- testAtomic0(cachesAtomicOffheapTiered);
- }
-
- /**
* INternal routine for ATOMIC cache testing.
*
* @param caches Caches.
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheColocatedOptimisticTransactionSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheColocatedOptimisticTransactionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheColocatedOptimisticTransactionSelfTest.java
index f056825..e32d4a1 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheColocatedOptimisticTransactionSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheColocatedOptimisticTransactionSelfTest.java
@@ -77,7 +77,6 @@ public class GridCacheColocatedOptimisticTransactionSelfTest extends GridCommonA
cc.setNearConfiguration(null);
cc.setBackups(1);
cc.setWriteSynchronizationMode(FULL_SYNC);
- cc.setEvictSynchronized(false);
c.setDiscoverySpi(disco);
c.setCacheConfiguration(cc);
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEvictionNearReadersSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEvictionNearReadersSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEvictionNearReadersSelfTest.java
index 2d2ef41..20162a7 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEvictionNearReadersSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEvictionNearReadersSelfTest.java
@@ -76,19 +76,15 @@ public class GridCacheDhtEvictionNearReadersSelfTest extends GridCommonAbstractT
cacheCfg.setCacheMode(PARTITIONED);
cacheCfg.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC);
- cacheCfg.setEvictSynchronized(true);
cacheCfg.setRebalanceMode(SYNC);
cacheCfg.setAtomicityMode(atomicityMode());
cacheCfg.setBackups(1);
- // Set eviction queue size explicitly.
- cacheCfg.setEvictSynchronizedKeyBufferSize(1);
- cacheCfg.setEvictMaxOverflowRatio(0);
-
FifoEvictionPolicy plc = new FifoEvictionPolicy();
plc.setMaxSize(10);
cacheCfg.setEvictionPolicy(plc);
+ cacheCfg.setOnheapCacheEnabled(true);
NearCacheConfiguration nearCfg = new NearCacheConfiguration();
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEvictionSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEvictionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEvictionSelfTest.java
deleted file mode 100644
index b177a86..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEvictionSelfTest.java
+++ /dev/null
@@ -1,356 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.internal.processors.cache.distributed.dht;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.UUID;
-import java.util.concurrent.atomic.AtomicInteger;
-import org.apache.ignite.Ignite;
-import org.apache.ignite.IgniteCheckedException;
-import org.apache.ignite.cache.CacheWriteSynchronizationMode;
-import org.apache.ignite.cache.eviction.fifo.FifoEvictionPolicy;
-import org.apache.ignite.cluster.ClusterNode;
-import org.apache.ignite.configuration.CacheConfiguration;
-import org.apache.ignite.configuration.IgniteConfiguration;
-import org.apache.ignite.configuration.NearCacheConfiguration;
-import org.apache.ignite.events.Event;
-import org.apache.ignite.internal.IgniteKernal;
-import org.apache.ignite.internal.processors.cache.distributed.near.GridNearCacheAdapter;
-import org.apache.ignite.internal.util.typedef.F;
-import org.apache.ignite.internal.util.typedef.P1;
-import org.apache.ignite.lang.IgniteFuture;
-import org.apache.ignite.lang.IgnitePredicate;
-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.junits.common.GridCommonAbstractTest;
-
-import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-import static org.apache.ignite.cache.CacheMode.PARTITIONED;
-import static org.apache.ignite.cache.CacheRebalanceMode.NONE;
-import static org.apache.ignite.events.EventType.EVT_CACHE_ENTRY_EVICTED;
-
-/**
- * Tests for dht cache eviction.
- */
-public class GridCacheDhtEvictionSelfTest extends GridCommonAbstractTest {
- /** */
- private static final int GRID_CNT = 2;
-
- /** */
- private TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true);
-
- /** Default constructor. */
- public GridCacheDhtEvictionSelfTest() {
- super(false /* don't start grid. */);
- }
-
- /** {@inheritDoc} */
- @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
- IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
-
- TcpDiscoverySpi disco = new TcpDiscoverySpi();
-
- disco.setIpFinder(ipFinder);
-
- cfg.setDiscoverySpi(disco);
-
- CacheConfiguration cacheCfg = defaultCacheConfiguration();
-
- cacheCfg.setCacheMode(PARTITIONED);
- cacheCfg.setRebalanceMode(NONE);
- cacheCfg.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC);
- cacheCfg.setEvictSynchronized(true);
- cacheCfg.setAtomicityMode(TRANSACTIONAL);
- cacheCfg.setBackups(1);
-
- NearCacheConfiguration nearCfg = new NearCacheConfiguration();
-
- FifoEvictionPolicy nearPlc = new FifoEvictionPolicy();
- nearPlc.setMaxSize(10000);
-
- nearCfg.setNearEvictionPolicy(nearPlc);
- cacheCfg.setNearConfiguration(nearCfg);
-
- // Set eviction queue size explicitly.
- cacheCfg.setEvictMaxOverflowRatio(0);
- cacheCfg.setEvictSynchronizedKeyBufferSize(1);
-
- FifoEvictionPolicy plc = new FifoEvictionPolicy();
- plc.setMaxSize(10000);
-
- cacheCfg.setEvictionPolicy(plc);
-
- cfg.setCacheConfiguration(cacheCfg);
-
- return cfg;
- }
-
- /** {@inheritDoc} */
- @SuppressWarnings({"ConstantConditions"})
- @Override protected void beforeTestsStarted() throws Exception {
- super.beforeTestsStarted();
-
- if (GRID_CNT < 2)
- throw new IgniteCheckedException("GRID_CNT must not be less than 2.");
-
- startGrids(GRID_CNT);
- }
-
- /** {@inheritDoc} */
- @Override protected void afterTestsStopped() throws Exception {
- super.afterTestsStopped();
-
- stopAllGrids();
- }
-
- /** {@inheritDoc} */
- @SuppressWarnings({"SizeReplaceableByIsEmpty"})
- @Override protected void beforeTest() throws Exception {
- for (int i = 0; i < GRID_CNT; i++) {
- assert near(grid(i)).size() == 0;
- assert dht(grid(i)).size() == 0;
-
- assert near(grid(i)).isEmpty();
- assert dht(grid(i)).isEmpty();
- }
- }
-
- /** {@inheritDoc} */
- @SuppressWarnings({"unchecked"})
- @Override protected void afterTest() throws Exception {
- for (int i = 0; i < GRID_CNT; i++) {
- near(grid(i)).removeAll();
-
- assert near(grid(i)).isEmpty() : "Near cache is not empty [idx=" + i + "]";
- assert dht(grid(i)).isEmpty() : "Dht cache is not empty [idx=" + i + "]";
- }
- }
-
- /**
- * @param g Grid.
- * @return Near cache.
- */
- @SuppressWarnings({"unchecked"})
- private GridNearCacheAdapter<Integer, String> near(Ignite g) {
- return (GridNearCacheAdapter)((IgniteKernal)g).internalCache();
- }
-
- /**
- * @param g Grid.
- * @return Dht cache.
- */
- @SuppressWarnings({"unchecked", "TypeMayBeWeakened"})
- private GridDhtCacheAdapter<Integer, String> dht(Ignite g) {
- return ((GridNearCacheAdapter)((IgniteKernal)g).internalCache()).dht();
- }
-
- /**
- * @param key Key.
- * @return Primary node for the given key.
- */
- private Collection<ClusterNode> keyNodes(Object key) {
- return grid(0).affinity(null).mapKeyToPrimaryAndBackups(key);
- }
-
- /**
- * @param nodeId Node id.
- * @return Predicate for events belonging to specified node.
- */
- private IgnitePredicate<Event> nodeEvent(final UUID nodeId) {
- assert nodeId != null;
-
- return new P1<Event>() {
- @Override public boolean apply(Event e) {
- info("Predicate called [e.nodeId()=" + e.node().id() + ", nodeId=" + nodeId + ']');
-
- return e.node().id().equals(nodeId);
- }
- };
- }
-
- /**
- * JUnit.
- *
- * @throws Exception If failed.
- */
- @SuppressWarnings("NullArgumentToVariableArgMethod")
- public void testSingleKey() throws Exception {
- Integer key = 1;
-
- Collection<ClusterNode> nodes = new ArrayList<>(keyNodes(key));
-
- ClusterNode primary = F.first(nodes);
-
- assert primary != null;
-
- nodes.remove(primary);
-
- ClusterNode backup = F.first(nodes);
-
- assert backup != null;
-
- assert !F.eqNodes(primary, backup);
-
- info("Key primary node: " + primary.id());
- info("Key backup node: " + backup.id());
-
- GridNearCacheAdapter<Integer, String> nearPrimary = near(grid(primary));
- GridDhtCacheAdapter<Integer, String> dhtPrimary = dht(grid(primary));
-
- GridNearCacheAdapter<Integer, String> nearBackup = near(grid(backup));
- GridDhtCacheAdapter<Integer, String> dhtBackup = dht(grid(backup));
-
- String val = "v1";
-
- // Put on primary node.
- nearPrimary.getAndPut(key, val, null);
-
- assertEquals(val, localPeek(nearPrimary, key));
- assertEquals(val, localPeek(dhtPrimary, key));
-
- assertEquals(val, localPeek(nearBackup, key));
- assertEquals(val, localPeek(dhtBackup, key));
-
- GridDhtCacheEntry entryPrimary = (GridDhtCacheEntry)dhtPrimary.peekEx(key);
- GridDhtCacheEntry entryBackup = (GridDhtCacheEntry)dhtBackup.peekEx(key);
-
- assert entryPrimary != null;
- assert entryBackup != null;
-
- assertTrue(entryPrimary.readers().isEmpty());
- assertTrue(entryBackup.readers().isEmpty());
-
- IgniteFuture<Event> futBackup =
- waitForLocalEvent(grid(backup).events(), nodeEvent(backup.id()), EVT_CACHE_ENTRY_EVICTED);
-
- IgniteFuture<Event> futPrimary =
- waitForLocalEvent(grid(primary).events(), nodeEvent(primary.id()), EVT_CACHE_ENTRY_EVICTED);
-
- // Evict on primary node.
- // It should trigger dht eviction and eviction on backup node.
- grid(primary).cache(null).localEvict(Collections.<Object>singleton(key));
-
- // Give some time for eviction event to occur on backup and primary node.
- futBackup.get(10_000);
- futPrimary.get(10_000);
-
- assertEquals(0, nearPrimary.size());
-
- assertNull(nearPrimary.peekEx(key));
- assertNull(dhtPrimary.peekEx(key));
-
- assertNull(nearBackup.peekEx(key));
- assertNull(dhtBackup.peekEx(key));
- }
-
- /**
- * JUnit.
- *
- * @throws Exception If failed.
- */
- @SuppressWarnings("NullArgumentToVariableArgMethod")
- public void testMultipleKeys() throws Exception {
- final int keyCnt = 1000;
-
- final Ignite primaryIgnite = grid(0);
- final Ignite backupIgnite = grid(1);
-
- GridNearCacheAdapter<Integer, String> nearPrimary = near(primaryIgnite);
- GridDhtCacheAdapter<Integer, String> dhtPrimary = dht(primaryIgnite);
-
- GridNearCacheAdapter<Integer, String> nearBackup = near(backupIgnite);
- GridDhtCacheAdapter<Integer, String> dhtBackup = dht(backupIgnite);
-
- Collection<Integer> keys = new ArrayList<>(keyCnt);
-
- for (int key = 0; keys.size() < keyCnt; key++) {
- if (F.eqNodes(primaryIgnite.cluster().localNode(), F.first(keyNodes(key))))
- keys.add(key++);
- }
-
- info("Test keys: " + keys);
-
- // Put on primary node.
- for (Integer key : keys)
- nearPrimary.getAndPut(key, "v" + key, null);
-
- for (Integer key : keys) {
- String val = "v" + key;
-
- assertEquals(val, localPeek(nearPrimary, key));
- assertEquals(val, localPeek(dhtPrimary, key));
-
- assertEquals(val, localPeek(nearBackup, key));
- assertEquals(val, localPeek(dhtBackup, key));
- }
-
- final AtomicInteger cntBackup = new AtomicInteger();
-
- IgniteFuture<Event> futBackup = waitForLocalEvent(backupIgnite.events(), new P1<Event>() {
- @Override public boolean apply(Event e) {
- return e.node().id().equals(backupIgnite.cluster().localNode().id()) &&
- cntBackup.incrementAndGet() == keyCnt;
- }
- }, EVT_CACHE_ENTRY_EVICTED);
-
- final AtomicInteger cntPrimary = new AtomicInteger();
-
- IgniteFuture<Event> futPrimary = waitForLocalEvent(primaryIgnite.events(), new P1<Event>() {
- @Override public boolean apply(Event e) {
- return e.node().id().equals(primaryIgnite.cluster().localNode().id()) &&
- cntPrimary.incrementAndGet() == keyCnt;
- }
- }, EVT_CACHE_ENTRY_EVICTED);
-
- // Evict on primary node.
- // Eviction of the last key should trigger queue processing.
- for (Integer key : keys)
- primaryIgnite.cache(null).localEvict(Collections.<Object>singleton(key));
-
- // Give some time for eviction events to occur on backup and primary node.
- futBackup.get(10_000);
- futPrimary.get(10_000);
-
- info("nearBackupSize: " + nearBackup.size());
- info("dhtBackupSize: " + dhtBackup.size());
- info("nearPrimarySize: " + nearPrimary.size());
- info("dhtPrimarySize: " + dhtPrimary.size());
-
- // Check backup node first.
- for (Integer key : keys) {
- String msg = "Failed key: " + key;
-
- assertNull(msg, localPeek(nearBackup, key));
- assertNull(msg, localPeek(dhtBackup, key));
- assertNull(msg, nearBackup.peekEx(key));
- assertNull(msg, dhtBackup.peekEx(key));
- }
-
- for (Integer key : keys) {
- String msg = "Failed key: " + key;
-
- assertNull(msg, localPeek(nearPrimary, key));
- assertNull(msg, localPeek(dhtPrimary, key));
- assertNull(msg, nearPrimary.peekEx(key));
- assertNull(dhtPrimary.peekEx(key));
- }
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadOffHeapSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadOffHeapSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadOffHeapSelfTest.java
deleted file mode 100644
index 2680a4f..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadOffHeapSelfTest.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.internal.processors.cache.distributed.dht;
-
-import org.apache.ignite.configuration.CacheConfiguration;
-import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPreloader;
-
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_VALUES;
-
-/**
- * Test cases for partitioned cache {@link GridDhtPreloader preloader} with off-heap value storage.
- */
-public class GridCacheDhtPreloadOffHeapSelfTest extends GridCacheDhtPreloadSelfTest {
- /** {@inheritDoc} */
- @Override protected CacheConfiguration cacheConfiguration(String igniteInstanceName) {
- CacheConfiguration cacheCfg = super.cacheConfiguration(igniteInstanceName);
-
- cacheCfg.setMemoryMode(OFFHEAP_VALUES);
- cacheCfg.setOffHeapMaxMemory(0);
-
- return cacheCfg;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadOnheapSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadOnheapSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadOnheapSelfTest.java
new file mode 100644
index 0000000..07a858e
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadOnheapSelfTest.java
@@ -0,0 +1,26 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.ignite.internal.processors.cache.distributed.dht;
+
+public class GridCacheDhtPreloadOnheapSelfTest extends GridCacheDhtPreloadSelfTest {
+ /** {@inheritDoc} */
+ @Override protected boolean onheapCacheEnabled() {
+ return true;
+ }
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadSelfTest.java
index 9987a8d..43aa10b 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadSelfTest.java
@@ -136,6 +136,7 @@ public class GridCacheDhtPreloadSelfTest extends GridCommonAbstractTest {
cacheCfg.setRebalanceMode(preloadMode);
cacheCfg.setAffinity(new RendezvousAffinityFunction(false, partitions));
cacheCfg.setBackups(backups);
+ cacheCfg.setOnheapCacheEnabled(onheapCacheEnabled());
return cacheCfg;
}
@@ -163,6 +164,13 @@ public class GridCacheDhtPreloadSelfTest extends GridCommonAbstractTest {
}
/**
+ * @return {@code True} if on-heap cache is enabled.
+ */
+ protected boolean onheapCacheEnabled() {
+ return false;
+ }
+
+ /**
* @throws Exception If failed.
*/
public void testActivePartitionTransferSyncSameCoordinator() throws Exception {
@@ -344,7 +352,8 @@ public class GridCacheDhtPreloadSelfTest extends GridCommonAbstractTest {
error("Test failed.", e);
throw e;
- } finally {
+ }
+ finally {
stopAllGrids();
}
}
@@ -432,7 +441,6 @@ public class GridCacheDhtPreloadSelfTest extends GridCommonAbstractTest {
checkNodes(1000, 4, false, false);
}
-
/**
* @throws Exception If failed.
*/
@@ -549,17 +557,16 @@ public class GridCacheDhtPreloadSelfTest extends GridCommonAbstractTest {
for (Ignite gg : ignites)
futs.add(waitForLocalEvent(gg.events(), new P1<Event>() {
- @Override public boolean apply(Event e) {
- CacheRebalancingEvent evt = (CacheRebalancingEvent)e;
+ @Override public boolean apply(Event e) {
+ CacheRebalancingEvent evt = (CacheRebalancingEvent)e;
- ClusterNode node = evt.discoveryNode();
+ ClusterNode node = evt.discoveryNode();
- return evt.type() == EVT_CACHE_REBALANCE_STOPPED && node.id().equals(nodeId) &&
- (evt.discoveryEventType() == EVT_NODE_LEFT ||
+ return evt.type() == EVT_CACHE_REBALANCE_STOPPED && node.id().equals(nodeId) &&
+ (evt.discoveryEventType() == EVT_NODE_LEFT ||
evt.discoveryEventType() == EVT_NODE_FAILED);
- }
- }, EVT_CACHE_REBALANCE_STOPPED));
-
+ }
+ }, EVT_CACHE_REBALANCE_STOPPED));
info("Before grid stop [name=" + g.name() + ", fullTop=" + top2string(ignites));
@@ -607,7 +614,8 @@ public class GridCacheDhtPreloadSelfTest extends GridCommonAbstractTest {
error("Test failed.", e);
throw e;
- } finally {
+ }
+ finally {
stopAllGrids();
}
}
@@ -652,9 +660,9 @@ public class GridCacheDhtPreloadSelfTest extends GridCommonAbstractTest {
boolean primary = primaryNode.equals(loc);
assertEquals("Key check failed [igniteInstanceName=" + ignite.name() +
- ", cache=" + cache.getName() + ", key=" + i + ", expected=" + i + ", actual=" + val +
- ", part=" + aff.partition(i) + ", primary=" + primary + ", affNodes=" + U.nodeIds(affNodes) +
- ", locId=" + loc.id() + ", allNodes=" + U.nodeIds(nodes) + ", allParts=" + top2string(grids) + ']',
+ ", cache=" + cache.getName() + ", key=" + i + ", expected=" + i + ", actual=" + val +
+ ", part=" + aff.partition(i) + ", primary=" + primary + ", affNodes=" + U.nodeIds(affNodes) +
+ ", locId=" + loc.id() + ", allNodes=" + U.nodeIds(nodes) + ", allParts=" + top2string(grids) + ']',
Integer.toString(i), val);
}
}
@@ -664,7 +672,7 @@ public class GridCacheDhtPreloadSelfTest extends GridCommonAbstractTest {
* @param grids Grids
* @return String representation of all partitions and their state.
*/
- @SuppressWarnings( {"ConstantConditions"})
+ @SuppressWarnings({"ConstantConditions"})
private String top2string(Iterable<Ignite> grids) {
Map<String, String> map = new HashMap<>();
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledAtomicOffHeapTieredMultiNodeFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledAtomicOffHeapTieredMultiNodeFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledAtomicOffHeapTieredMultiNodeFullApiSelfTest.java
deleted file mode 100644
index 4bddbf9..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledAtomicOffHeapTieredMultiNodeFullApiSelfTest.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.internal.processors.cache.distributed.dht;
-
-import org.apache.ignite.cache.CacheAtomicityMode;
-
-import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
-
-/**
- * Tests colocated cache with off-heap tiered mode.
- */
-public class GridCachePartitionedNearDisabledAtomicOffHeapTieredMultiNodeFullApiSelfTest extends
- GridCachePartitionedNearDisabledOffHeapTieredMultiNodeFullApiSelfTest {
- /** {@inheritDoc} */
- @Override protected CacheAtomicityMode atomicityMode() {
- return ATOMIC;
- }
-
- /** {@inheritDoc} */
- @Override protected boolean txEnabled() {
- return false;
- }
-
- /** {@inheritDoc} */
- @Override protected boolean lockingEnabled() {
- return false;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledAtomicOnheapFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledAtomicOnheapFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledAtomicOnheapFullApiSelfTest.java
new file mode 100644
index 0000000..14facae
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledAtomicOnheapFullApiSelfTest.java
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.ignite.internal.processors.cache.distributed.dht;
+
+import org.apache.ignite.cache.CacheAtomicityMode;
+
+public class GridCachePartitionedNearDisabledAtomicOnheapFullApiSelfTest extends GridCachePartitionedNearDisabledOnheapFullApiSelfTest {
+ /** {@inheritDoc} */
+ @Override protected CacheAtomicityMode atomicityMode() {
+ return CacheAtomicityMode.ATOMIC;
+ }
+
+ /** {@inheritDoc} */
+ @Override protected boolean txEnabled() {
+ return false;
+ }
+
+ /** {@inheritDoc} */
+ @Override protected boolean lockingEnabled() {
+ return false;
+ }
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledAtomicOnheapMultiNodeFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledAtomicOnheapMultiNodeFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledAtomicOnheapMultiNodeFullApiSelfTest.java
new file mode 100644
index 0000000..20e7b7a
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledAtomicOnheapMultiNodeFullApiSelfTest.java
@@ -0,0 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.ignite.internal.processors.cache.distributed.dht;
+
+import org.apache.ignite.cache.CacheAtomicityMode;
+
+public class GridCachePartitionedNearDisabledAtomicOnheapMultiNodeFullApiSelfTest extends GridCachePartitionedNearDisabledOnheapMultiNodeFullApiSelfTest {
+ /** {@inheritDoc} */
+ @Override protected CacheAtomicityMode atomicityMode() {
+ return CacheAtomicityMode.ATOMIC;
+ }
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledOffHeapFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledOffHeapFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledOffHeapFullApiSelfTest.java
deleted file mode 100644
index 6f64c9a..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledOffHeapFullApiSelfTest.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.internal.processors.cache.distributed.dht;
-
-import org.apache.ignite.cache.CacheMemoryMode;
-
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_VALUES;
-
-/**
- * Tests colocated cache with values being stored off-heap.
- */
-public class GridCachePartitionedNearDisabledOffHeapFullApiSelfTest extends
- GridCachePartitionedNearDisabledFullApiSelfTest {
- /** {@inheritDoc} */
- @Override protected CacheMemoryMode memoryMode() {
- return OFFHEAP_VALUES;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledOffHeapMultiNodeFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledOffHeapMultiNodeFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledOffHeapMultiNodeFullApiSelfTest.java
deleted file mode 100644
index b559395..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledOffHeapMultiNodeFullApiSelfTest.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.internal.processors.cache.distributed.dht;
-
-import org.apache.ignite.cache.CacheMemoryMode;
-
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_VALUES;
-
-/**
- * Tests colocated cache with values being stored off-heap.
- */
-public class GridCachePartitionedNearDisabledOffHeapMultiNodeFullApiSelfTest
- extends GridCachePartitionedNearDisabledMultiNodeFullApiSelfTest {
- /** {@inheritDoc} */
- @Override protected CacheMemoryMode memoryMode() {
- return OFFHEAP_VALUES;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledOffHeapTieredAtomicFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledOffHeapTieredAtomicFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledOffHeapTieredAtomicFullApiSelfTest.java
deleted file mode 100644
index 7e3220f..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledOffHeapTieredAtomicFullApiSelfTest.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.internal.processors.cache.distributed.dht;
-
-import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMemoryMode;
-import org.apache.ignite.configuration.NearCacheConfiguration;
-import org.apache.ignite.internal.processors.cache.distributed.near.GridCachePartitionedFullApiSelfTest;
-
-import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
-
-/**
- * Tests colocated cache with off-heap tiered mode.
- */
-public class GridCachePartitionedNearDisabledOffHeapTieredAtomicFullApiSelfTest extends
- GridCachePartitionedFullApiSelfTest {
- /** {@inheritDoc} */
- @Override protected CacheAtomicityMode atomicityMode() {
- return ATOMIC;
- }
-
- /** {@inheritDoc} */
- @Override protected boolean txEnabled() {
- return false;
- }
-
- /** {@inheritDoc} */
- @Override protected boolean lockingEnabled() {
- return false;
- }
-
- /** {@inheritDoc} */
- @Override protected NearCacheConfiguration nearConfiguration() {
- return null;
- }
-
- /** {@inheritDoc} */
- @Override protected CacheMemoryMode memoryMode() {
- return OFFHEAP_TIERED;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledOffHeapTieredFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledOffHeapTieredFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledOffHeapTieredFullApiSelfTest.java
deleted file mode 100644
index 1ff7702..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledOffHeapTieredFullApiSelfTest.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.internal.processors.cache.distributed.dht;
-
-import org.apache.ignite.cache.CacheMemoryMode;
-
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
-
-/**
- * Tests colocated cache with off-heap tiered mode.
- */
-public class GridCachePartitionedNearDisabledOffHeapTieredFullApiSelfTest extends
- GridCachePartitionedNearDisabledOffHeapFullApiSelfTest {
- /** {@inheritDoc} */
- @Override protected CacheMemoryMode memoryMode() {
- return OFFHEAP_TIERED;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledOffHeapTieredMultiNodeFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledOffHeapTieredMultiNodeFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledOffHeapTieredMultiNodeFullApiSelfTest.java
deleted file mode 100644
index 7fc98cc..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledOffHeapTieredMultiNodeFullApiSelfTest.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.internal.processors.cache.distributed.dht;
-
-import org.apache.ignite.cache.CacheMemoryMode;
-
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
-
-/**
- * Tests colocated cache with off-heap tiered mode.
- */
-public class GridCachePartitionedNearDisabledOffHeapTieredMultiNodeFullApiSelfTest extends
- GridCachePartitionedNearDisabledOffHeapMultiNodeFullApiSelfTest {
- /** {@inheritDoc} */
- @Override protected CacheMemoryMode memoryMode() {
- return OFFHEAP_TIERED;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledOnheapFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledOnheapFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledOnheapFullApiSelfTest.java
new file mode 100644
index 0000000..620db8a
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledOnheapFullApiSelfTest.java
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.ignite.internal.processors.cache.distributed.dht;
+
+public class GridCachePartitionedNearDisabledOnheapFullApiSelfTest
+ extends GridCachePartitionedNearDisabledFullApiSelfTest {
+ /** {@inheritDoc} */
+ @Override protected boolean onheapCacheEnabled() {
+ return true;
+ }
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledOnheapMultiNodeFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledOnheapMultiNodeFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledOnheapMultiNodeFullApiSelfTest.java
new file mode 100644
index 0000000..3769103
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledOnheapMultiNodeFullApiSelfTest.java
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.ignite.internal.processors.cache.distributed.dht;
+
+public class GridCachePartitionedNearDisabledOnheapMultiNodeFullApiSelfTest
+ extends GridCachePartitionedNearDisabledMultiNodeFullApiSelfTest {
+ /** {@inheritDoc} */
+ @Override protected boolean onheapCacheEnabled() {
+ return true;
+ }
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheConcurrentPutGetRemove.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheConcurrentPutGetRemove.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheConcurrentPutGetRemove.java
index 436eec8..ca7b3ed 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheConcurrentPutGetRemove.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheConcurrentPutGetRemove.java
@@ -24,7 +24,6 @@ import java.util.concurrent.atomic.AtomicInteger;
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.affinity.Affinity;
import org.apache.ignite.cluster.ClusterNode;
import org.apache.ignite.configuration.CacheConfiguration;
@@ -38,8 +37,6 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
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.OFFHEAP_TIERED;
-import static org.apache.ignite.cache.CacheMemoryMode.ONHEAP_TIERED;
import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
/**
@@ -72,28 +69,14 @@ public class IgniteCacheConcurrentPutGetRemove extends GridCommonAbstractTest {
* @throws Exception If failed.
*/
public void testPutGetRemoveAtomic() throws Exception {
- putGetRemove(cacheConfiguration(ATOMIC, ONHEAP_TIERED, 1));
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testPutGetRemoveAtomicOffheap() throws Exception {
- putGetRemove(cacheConfiguration(ATOMIC, OFFHEAP_TIERED, 1));
+ putGetRemove(cacheConfiguration(ATOMIC, 1));
}
/**
* @throws Exception If failed.
*/
public void testPutGetRemoveTx() throws Exception {
- putGetRemove(cacheConfiguration(TRANSACTIONAL, ONHEAP_TIERED, 1));
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testPutGetRemoveTxOffheap() throws Exception {
- putGetRemove(cacheConfiguration(TRANSACTIONAL, OFFHEAP_TIERED, 1));
+ putGetRemove(cacheConfiguration(TRANSACTIONAL, 1));
}
/**
@@ -181,17 +164,13 @@ public class IgniteCacheConcurrentPutGetRemove extends GridCommonAbstractTest {
/**
* @param atomicityMode Cache atomicity mode.
- * @param memoryMode Cache memory mode.
* @param backups Backups number.
* @return Cache configuration.
*/
- private CacheConfiguration cacheConfiguration(CacheAtomicityMode atomicityMode,
- CacheMemoryMode memoryMode,
- int backups) {
+ private CacheConfiguration cacheConfiguration(CacheAtomicityMode atomicityMode, int backups) {
CacheConfiguration ccfg = new CacheConfiguration();
ccfg.setAtomicityMode(atomicityMode);
- ccfg.setMemoryMode(memoryMode);
ccfg.setBackups(backups);
ccfg.setWriteSynchronizationMode(FULL_SYNC);
ccfg.setAtomicWriteOrderMode(PRIMARY);
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheCrossCacheTxFailoverTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheCrossCacheTxFailoverTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheCrossCacheTxFailoverTest.java
index 9a1aaff..0831d1e 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheCrossCacheTxFailoverTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheCrossCacheTxFailoverTest.java
@@ -53,9 +53,7 @@ import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
import static org.apache.ignite.cache.CacheMode.PARTITIONED;
import static org.apache.ignite.cache.CacheMode.REPLICATED;
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.testframework.GridTestUtils.setMemoryMode;
import static org.apache.ignite.transactions.TransactionConcurrency.OPTIMISTIC;
import static org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC;
import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_READ;
@@ -115,13 +113,11 @@ public class IgniteCacheCrossCacheTxFailoverTest extends GridCommonAbstractTest
* @param name Cache name.
* @param cacheMode Cache mode.
* @param parts Number of partitions.
- * @param memMode Memory mode.
* @return Cache configuration.
*/
private CacheConfiguration cacheConfiguration(String name,
CacheMode cacheMode,
- int parts,
- TestMemoryMode memMode) {
+ int parts) {
CacheConfiguration ccfg = new CacheConfiguration();
ccfg.setName(name);
@@ -134,8 +130,6 @@ public class IgniteCacheCrossCacheTxFailoverTest extends GridCommonAbstractTest
ccfg.setAffinity(new RendezvousAffinityFunction(false, parts));
- setMemoryMode(null, ccfg, memMode, 100, 1024);
-
return ccfg;
}
@@ -148,70 +142,56 @@ public class IgniteCacheCrossCacheTxFailoverTest extends GridCommonAbstractTest
* @throws Exception If failed.
*/
public void testCrossCachePessimisticTxFailover() throws Exception {
- crossCacheTxFailover(PARTITIONED, true, PESSIMISTIC, REPEATABLE_READ, TestMemoryMode.HEAP);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testCrossCachePessimisticTxFailoverOffheapSwap() throws Exception {
- crossCacheTxFailover(PARTITIONED, true, PESSIMISTIC, REPEATABLE_READ, TestMemoryMode.OFFHEAP_EVICT_SWAP);
+ crossCacheTxFailover(PARTITIONED, true, PESSIMISTIC, REPEATABLE_READ);
}
/**
* @throws Exception If failed.
*/
public void testCrossCachePessimisticTxFailoverDifferentAffinity() throws Exception {
- crossCacheTxFailover(PARTITIONED, false, PESSIMISTIC, REPEATABLE_READ, TestMemoryMode.HEAP);
+ crossCacheTxFailover(PARTITIONED, false, PESSIMISTIC, REPEATABLE_READ);
}
/**
* @throws Exception If failed.
*/
public void testCrossCacheOptimisticTxFailover() throws Exception {
- crossCacheTxFailover(PARTITIONED, true, OPTIMISTIC, REPEATABLE_READ, TestMemoryMode.HEAP);
+ crossCacheTxFailover(PARTITIONED, true, OPTIMISTIC, REPEATABLE_READ);
}
/**
* @throws Exception If failed.
*/
public void testCrossCacheOptimisticSerializableTxFailover() throws Exception {
- crossCacheTxFailover(PARTITIONED, true, OPTIMISTIC, SERIALIZABLE, TestMemoryMode.HEAP);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testCrossCacheOptimisticTxFailoverOffheapSwap() throws Exception {
- crossCacheTxFailover(PARTITIONED, true, OPTIMISTIC, REPEATABLE_READ, TestMemoryMode.OFFHEAP_EVICT_SWAP);
+ crossCacheTxFailover(PARTITIONED, true, OPTIMISTIC, SERIALIZABLE);
}
/**
* @throws Exception If failed.
*/
public void testCrossCacheOptimisticTxFailoverDifferentAffinity() throws Exception {
- crossCacheTxFailover(PARTITIONED, false, OPTIMISTIC, REPEATABLE_READ, TestMemoryMode.HEAP);
+ crossCacheTxFailover(PARTITIONED, false, OPTIMISTIC, REPEATABLE_READ);
}
/**
* @throws Exception If failed.
*/
public void testCrossCachePessimisticTxFailoverReplicated() throws Exception {
- crossCacheTxFailover(REPLICATED, true, PESSIMISTIC, REPEATABLE_READ, TestMemoryMode.HEAP);
+ crossCacheTxFailover(REPLICATED, true, PESSIMISTIC, REPEATABLE_READ);
}
/**
* @throws Exception If failed.
*/
public void testCrossCacheOptimisticTxFailoverReplicated() throws Exception {
- crossCacheTxFailover(REPLICATED, true, OPTIMISTIC, REPEATABLE_READ, TestMemoryMode.HEAP);
+ crossCacheTxFailover(REPLICATED, true, OPTIMISTIC, REPEATABLE_READ);
}
/**
* @throws Exception If failed.
*/
public void testCrossCachePessimisticTxFailoverDifferentAffinityReplicated() throws Exception {
- crossCacheTxFailover(PARTITIONED, false, PESSIMISTIC, REPEATABLE_READ, TestMemoryMode.HEAP);
+ crossCacheTxFailover(PARTITIONED, false, PESSIMISTIC, REPEATABLE_READ);
}
/**
@@ -219,21 +199,19 @@ public class IgniteCacheCrossCacheTxFailoverTest extends GridCommonAbstractTest
* @param sameAff If {@code false} uses different number of partitions for caches.
* @param concurrency Transaction concurrency.
* @param isolation Transaction isolation.
- * @param memMode Memory mode.
* @throws Exception If failed.
*/
private void crossCacheTxFailover(CacheMode cacheMode,
boolean sameAff,
final TransactionConcurrency concurrency,
- final TransactionIsolation isolation,
- TestMemoryMode memMode) throws Exception {
+ final TransactionIsolation isolation) throws Exception {
IgniteKernal ignite0 = (IgniteKernal)ignite(0);
final AtomicBoolean stop = new AtomicBoolean();
try {
- ignite0.createCache(cacheConfiguration(CACHE1, cacheMode, 256, memMode));
- ignite0.createCache(cacheConfiguration(CACHE2, cacheMode, sameAff ? 256 : 128, memMode));
+ ignite0.createCache(cacheConfiguration(CACHE1, cacheMode, 256));
+ ignite0.createCache(cacheConfiguration(CACHE2, cacheMode, sameAff ? 256 : 128));
final AtomicInteger threadIdx = new AtomicInteger();
[04/17] ignite git commit: IGNITE-4535 - Add option to store
deserialized values on-heap
Posted by ag...@apache.org.
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinaryCacheTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinaryCacheTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinaryCacheTestSuite.java
index 995c686..f2d1556 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinaryCacheTestSuite.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinaryCacheTestSuite.java
@@ -23,10 +23,6 @@ import org.apache.ignite.internal.binary.BinaryMarshaller;
import org.apache.ignite.internal.processors.cache.GridCacheAffinityRoutingSelfTest;
import org.apache.ignite.internal.processors.cache.GridCacheEntryMemorySizeSelfTest;
import org.apache.ignite.internal.processors.cache.GridCacheMvccSelfTest;
-import org.apache.ignite.internal.processors.cache.GridCacheOffHeapTieredAtomicSelfTest;
-import org.apache.ignite.internal.processors.cache.GridCacheOffHeapTieredEvictionAtomicSelfTest;
-import org.apache.ignite.internal.processors.cache.GridCacheOffHeapTieredEvictionSelfTest;
-import org.apache.ignite.internal.processors.cache.GridCacheOffHeapTieredSelfTest;
import org.apache.ignite.internal.processors.cache.binary.CacheKeepBinaryWithInterceptorTest;
import org.apache.ignite.internal.processors.cache.expiry.IgniteCacheAtomicLocalExpiryPolicyTest;
import org.apache.ignite.internal.processors.cache.binary.GridBinaryCacheEntryMemorySizeSelfTest;
@@ -37,14 +33,8 @@ import org.apache.ignite.internal.processors.cache.binary.distributed.dht.GridCa
import org.apache.ignite.internal.processors.cache.binary.distributed.dht.GridCacheAtomicPartitionedOnlyBinaryDataStreamerMultithreadedSelfTest;
import org.apache.ignite.internal.processors.cache.binary.distributed.dht.GridCacheAtomicPartitionedOnlyBinaryMultiNodeSelfTest;
import org.apache.ignite.internal.processors.cache.binary.distributed.dht.GridCacheAtomicPartitionedOnlyBinaryMultithreadedSelfTest;
-import org.apache.ignite.internal.processors.cache.binary.distributed.dht.GridCacheMemoryModeBinarySelfTest;
-import org.apache.ignite.internal.processors.cache.binary.distributed.dht.GridCacheOffHeapTieredAtomicBinarySelfTest;
-import org.apache.ignite.internal.processors.cache.binary.distributed.dht.GridCacheOffHeapTieredEvictionAtomicBinarySelfTest;
-import org.apache.ignite.internal.processors.cache.binary.distributed.dht.GridCacheOffHeapTieredEvictionBinarySelfTest;
-import org.apache.ignite.internal.processors.cache.binary.distributed.dht.GridCacheOffHeapTieredBinarySelfTest;
import org.apache.ignite.internal.processors.cache.binary.distributed.dht.GridCacheBinariesNearPartitionedByteArrayValuesSelfTest;
import org.apache.ignite.internal.processors.cache.binary.distributed.dht.GridCacheBinariesPartitionedOnlyByteArrayValuesSelfTest;
-import org.apache.ignite.internal.processors.cache.expiry.IgniteCacheAtomicLocalOffheapExpiryPolicyTest;
import org.apache.ignite.internal.processors.datastreamer.DataStreamProcessorSelfTest;
import org.apache.ignite.testframework.config.GridTestProperties;
@@ -65,13 +55,8 @@ public class IgniteBinaryCacheTestSuite extends TestSuite {
// Tests below have a special version for Binary Marshaller
ignoredTests.add(DataStreamProcessorSelfTest.class);
- ignoredTests.add(GridCacheOffHeapTieredEvictionAtomicSelfTest.class);
- ignoredTests.add(GridCacheOffHeapTieredEvictionSelfTest.class);
- ignoredTests.add(GridCacheOffHeapTieredSelfTest.class);
- ignoredTests.add(GridCacheOffHeapTieredAtomicSelfTest.class);
ignoredTests.add(GridCacheAffinityRoutingSelfTest.class);
ignoredTests.add(IgniteCacheAtomicLocalExpiryPolicyTest.class);
- ignoredTests.add(IgniteCacheAtomicLocalOffheapExpiryPolicyTest.class);
ignoredTests.add(GridCacheEntryMemorySizeSelfTest.class);
// Tests that are not ready to be used with BinaryMarshaller
@@ -81,13 +66,9 @@ public class IgniteBinaryCacheTestSuite extends TestSuite {
// TODO GG-11148
// suite.addTestSuite(GridCacheMemoryModeBinarySelfTest.class);
- suite.addTestSuite(GridCacheOffHeapTieredEvictionAtomicBinarySelfTest.class);
- suite.addTestSuite(GridCacheOffHeapTieredEvictionBinarySelfTest.class);
suite.addTestSuite(GridCacheBinariesPartitionedOnlyByteArrayValuesSelfTest.class);
suite.addTestSuite(GridCacheBinariesNearPartitionedByteArrayValuesSelfTest.class);
- suite.addTestSuite(GridCacheOffHeapTieredBinarySelfTest.class);
- suite.addTestSuite(GridCacheOffHeapTieredAtomicBinarySelfTest.class);
suite.addTestSuite(GridDataStreamerImplSelfTest.class);
suite.addTestSuite(DataStreamProcessorBinarySelfTest.class);
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinaryObjectsTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinaryObjectsTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinaryObjectsTestSuite.java
index 7cc37e8..5cecfac 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinaryObjectsTestSuite.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinaryObjectsTestSuite.java
@@ -50,7 +50,6 @@ import org.apache.ignite.internal.binary.noncompact.BinaryObjectBuilderNonCompac
import org.apache.ignite.internal.binary.noncompact.BinaryObjectBuilderNonCompactSimpleNameLowerCaseMappersSelfTest;
import org.apache.ignite.internal.binary.streams.BinaryHeapStreamByteOrderSelfTest;
import org.apache.ignite.internal.binary.streams.BinaryOffheapStreamByteOrderSelfTest;
-import org.apache.ignite.internal.processors.cache.BinaryObjectOffHeapUnswapTemporaryTest;
import org.apache.ignite.internal.processors.cache.binary.BinaryMetadataUpdatesFlowTest;
import org.apache.ignite.internal.processors.cache.binary.GridCacheBinaryObjectMetadataExchangeMultinodeTest;
import org.apache.ignite.internal.processors.cache.binary.GridCacheBinaryObjectUserClassloaderSelfTest;
@@ -59,17 +58,12 @@ import org.apache.ignite.internal.processors.cache.binary.GridCacheBinaryStoreBi
import org.apache.ignite.internal.processors.cache.binary.GridCacheBinaryStoreObjectsSelfTest;
import org.apache.ignite.internal.processors.cache.binary.GridCacheClientNodeBinaryObjectMetadataMultinodeTest;
import org.apache.ignite.internal.processors.cache.binary.GridCacheClientNodeBinaryObjectMetadataTest;
-import org.apache.ignite.internal.processors.cache.binary.distributed.dht.GridCacheBinaryObjectsAtomicNearDisabledOffheapTieredSelfTest;
import org.apache.ignite.internal.processors.cache.binary.distributed.dht.GridCacheBinaryObjectsAtomicNearDisabledSelfTest;
-import org.apache.ignite.internal.processors.cache.binary.distributed.dht.GridCacheBinaryObjectsAtomicOffheapTieredSelfTest;
import org.apache.ignite.internal.processors.cache.binary.distributed.dht.GridCacheBinaryObjectsAtomicSelfTest;
-import org.apache.ignite.internal.processors.cache.binary.distributed.dht.GridCacheBinaryObjectsPartitionedNearDisabledOffheapTieredSelfTest;
import org.apache.ignite.internal.processors.cache.binary.distributed.dht.GridCacheBinaryObjectsPartitionedNearDisabledSelfTest;
-import org.apache.ignite.internal.processors.cache.binary.distributed.dht.GridCacheBinaryObjectsPartitionedOffheapTieredSelfTest;
import org.apache.ignite.internal.processors.cache.binary.distributed.dht.GridCacheBinaryObjectsPartitionedSelfTest;
import org.apache.ignite.internal.processors.cache.binary.distributed.replicated.GridCacheBinaryObjectsReplicatedSelfTest;
import org.apache.ignite.internal.processors.cache.binary.local.GridCacheBinaryObjectsAtomicLocalSelfTest;
-import org.apache.ignite.internal.processors.cache.binary.local.GridCacheBinaryObjectsLocalOffheapTieredSelfTest;
import org.apache.ignite.internal.processors.cache.binary.local.GridCacheBinaryObjectsLocalSelfTest;
import org.apache.ignite.internal.processors.cache.distributed.IgniteBinaryMetadataUpdateChangingTopologySelfTest;
import org.apache.ignite.internal.processors.cache.portable.BinaryAtomicCacheLocalEntriesSelfTest;
@@ -130,13 +124,6 @@ public class IgniteBinaryObjectsTestSuite extends TestSuite {
suite.addTestSuite(GridCacheBinaryObjectsPartitionedNearDisabledSelfTest.class);
suite.addTestSuite(GridCacheBinaryObjectsAtomicSelfTest.class);
suite.addTestSuite(GridCacheBinaryObjectsAtomicNearDisabledSelfTest.class);
- suite.addTestSuite(BinaryObjectOffHeapUnswapTemporaryTest.class);
-
- suite.addTestSuite(GridCacheBinaryObjectsLocalOffheapTieredSelfTest.class);
- suite.addTestSuite(GridCacheBinaryObjectsAtomicOffheapTieredSelfTest.class);
- suite.addTestSuite(GridCacheBinaryObjectsAtomicNearDisabledOffheapTieredSelfTest.class);
- suite.addTestSuite(GridCacheBinaryObjectsPartitionedOffheapTieredSelfTest.class);
- suite.addTestSuite(GridCacheBinaryObjectsPartitionedNearDisabledOffheapTieredSelfTest.class);
suite.addTestSuite(GridCacheBinaryStoreObjectsSelfTest.class);
suite.addTestSuite(GridCacheBinaryStoreBinariesDefaultMappersSelfTest.class);
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheDataStructuresSelfTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheDataStructuresSelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheDataStructuresSelfTestSuite.java
index 980d550..84e7953 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheDataStructuresSelfTestSuite.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheDataStructuresSelfTestSuite.java
@@ -24,10 +24,8 @@ import org.apache.ignite.internal.processors.cache.datastructures.IgniteClientDa
import org.apache.ignite.internal.processors.cache.datastructures.IgniteClientDiscoveryDataStructuresTest;
import org.apache.ignite.internal.processors.cache.datastructures.IgniteDataStructureUniqueNameTest;
import org.apache.ignite.internal.processors.cache.datastructures.IgniteDataStructureWithJobTest;
-import org.apache.ignite.internal.processors.cache.datastructures.local.GridCacheLocalAtomicOffheapSetSelfTest;
import org.apache.ignite.internal.processors.cache.datastructures.local.GridCacheLocalAtomicQueueApiSelfTest;
import org.apache.ignite.internal.processors.cache.datastructures.local.GridCacheLocalAtomicSetSelfTest;
-import org.apache.ignite.internal.processors.cache.datastructures.local.GridCacheLocalOffheapQueueApiSelfTest;
import org.apache.ignite.internal.processors.cache.datastructures.local.GridCacheLocalQueueApiSelfTest;
import org.apache.ignite.internal.processors.cache.datastructures.local.GridCacheLocalSequenceApiSelfTest;
import org.apache.ignite.internal.processors.cache.datastructures.local.GridCacheLocalSetSelfTest;
@@ -35,9 +33,6 @@ import org.apache.ignite.internal.processors.cache.datastructures.local.IgniteLo
import org.apache.ignite.internal.processors.cache.datastructures.local.IgniteLocalCountDownLatchSelfTest;
import org.apache.ignite.internal.processors.cache.datastructures.local.IgniteLocalLockSelfTest;
import org.apache.ignite.internal.processors.cache.datastructures.local.IgniteLocalSemaphoreSelfTest;
-import org.apache.ignite.internal.processors.cache.datastructures.partitioned.GridCachePartitionedAtomicOffheapQueueApiSelfTest;
-import org.apache.ignite.internal.processors.cache.datastructures.partitioned.GridCachePartitionedAtomicOffheapQueueCreateMultiNodeSelfTest;
-import org.apache.ignite.internal.processors.cache.datastructures.partitioned.GridCachePartitionedAtomicOffheapQueueMultiNodeSelfTest;
import org.apache.ignite.internal.processors.cache.datastructures.partitioned.GridCachePartitionedAtomicQueueApiSelfTest;
import org.apache.ignite.internal.processors.cache.datastructures.partitioned.GridCachePartitionedAtomicQueueCreateMultiNodeSelfTest;
import org.apache.ignite.internal.processors.cache.datastructures.partitioned.GridCachePartitionedAtomicQueueFailoverDataConsistencySelfTest;
@@ -51,10 +46,6 @@ import org.apache.ignite.internal.processors.cache.datastructures.partitioned.Gr
import org.apache.ignite.internal.processors.cache.datastructures.partitioned.GridCachePartitionedAtomicStampedApiSelfTest;
import org.apache.ignite.internal.processors.cache.datastructures.partitioned.GridCachePartitionedDataStructuresFailoverSelfTest;
import org.apache.ignite.internal.processors.cache.datastructures.partitioned.GridCachePartitionedNodeRestartTxSelfTest;
-import org.apache.ignite.internal.processors.cache.datastructures.partitioned.GridCachePartitionedOffHeapValuesQueueApiSelfTest;
-import org.apache.ignite.internal.processors.cache.datastructures.partitioned.GridCachePartitionedOffHeapValuesSetSelfTest;
-import org.apache.ignite.internal.processors.cache.datastructures.partitioned.GridCachePartitionedOffheapDataStructuresFailoverSelfTest;
-import org.apache.ignite.internal.processors.cache.datastructures.partitioned.GridCachePartitionedOffheapSetFailoverSelfTest;
import org.apache.ignite.internal.processors.cache.datastructures.partitioned.GridCachePartitionedQueueApiSelfTest;
import org.apache.ignite.internal.processors.cache.datastructures.partitioned.GridCachePartitionedQueueCreateMultiNodeSelfTest;
import org.apache.ignite.internal.processors.cache.datastructures.partitioned.GridCachePartitionedQueueEntryMoveSelfTest;
@@ -104,9 +95,7 @@ public class IgniteCacheDataStructuresSelfTestSuite extends TestSuite {
suite.addTest(new TestSuite(GridCacheLocalSequenceApiSelfTest.class));
suite.addTest(new TestSuite(GridCacheLocalSetSelfTest.class));
suite.addTest(new TestSuite(GridCacheLocalAtomicSetSelfTest.class));
- suite.addTest(new TestSuite(GridCacheLocalAtomicOffheapSetSelfTest.class));
suite.addTest(new TestSuite(GridCacheLocalQueueApiSelfTest.class));
- suite.addTest(new TestSuite(GridCacheLocalOffheapQueueApiSelfTest.class));
suite.addTest(new TestSuite(GridCacheLocalAtomicQueueApiSelfTest.class));
suite.addTest(new TestSuite(IgniteLocalCountDownLatchSelfTest.class));
suite.addTest(new TestSuite(IgniteLocalSemaphoreSelfTest.class));
@@ -127,18 +116,13 @@ public class IgniteCacheDataStructuresSelfTestSuite extends TestSuite {
suite.addTest(new TestSuite(GridCachePartitionedSequenceApiSelfTest.class));
suite.addTest(new TestSuite(GridCachePartitionedSequenceMultiNodeSelfTest.class));
suite.addTest(new TestSuite(GridCachePartitionedQueueApiSelfTest.class));
- suite.addTest(new TestSuite(GridCachePartitionedOffHeapValuesQueueApiSelfTest.class));
suite.addTest(new TestSuite(GridCachePartitionedAtomicQueueApiSelfTest.class));
- suite.addTest(new TestSuite(GridCachePartitionedAtomicOffheapQueueApiSelfTest.class));
suite.addTest(new TestSuite(GridCachePartitionedQueueMultiNodeSelfTest.class));
suite.addTest(new TestSuite(GridCachePartitionedAtomicQueueMultiNodeSelfTest.class));
- suite.addTest(new TestSuite(GridCachePartitionedAtomicOffheapQueueMultiNodeSelfTest.class));
suite.addTest(new TestSuite(GridCachePartitionedQueueCreateMultiNodeSelfTest.class));
suite.addTest(new TestSuite(GridCachePartitionedAtomicQueueCreateMultiNodeSelfTest.class));
- suite.addTest(new TestSuite(GridCachePartitionedAtomicOffheapQueueCreateMultiNodeSelfTest.class));
suite.addTest(new TestSuite(GridCachePartitionedSetSelfTest.class));
- suite.addTest(new TestSuite(GridCachePartitionedOffHeapValuesSetSelfTest.class));
suite.addTest(new TestSuite(IgnitePartitionedSetNoBackupsSelfTest.class));
suite.addTest(new TestSuite(GridCachePartitionedAtomicSetSelfTest.class));
suite.addTest(new TestSuite(IgnitePartitionedCountDownLatchSelfTest.class));
@@ -150,7 +134,6 @@ public class IgniteCacheDataStructuresSelfTestSuite extends TestSuite {
// suite.addTest(new TestSuite(IgnitePartitionedLockSelfTest.class));
suite.addTest(new TestSuite(GridCachePartitionedSetFailoverSelfTest.class));
- suite.addTest(new TestSuite(GridCachePartitionedOffheapSetFailoverSelfTest.class));
suite.addTest(new TestSuite(GridCachePartitionedAtomicSetFailoverSelfTest.class));
suite.addTest(new TestSuite(GridCachePartitionedQueueRotativeMultiNodeTest.class));
@@ -160,7 +143,6 @@ public class IgniteCacheDataStructuresSelfTestSuite extends TestSuite {
suite.addTest(new TestSuite(GridCachePartitionedQueueEntryMoveSelfTest.class));
suite.addTest(new TestSuite(GridCachePartitionedDataStructuresFailoverSelfTest.class));
- suite.addTest(new TestSuite(GridCachePartitionedOffheapDataStructuresFailoverSelfTest.class));
suite.addTest(new TestSuite(GridCacheQueueMultiNodeConsistencySelfTest.class));
suite.addTest(new TestSuite(IgniteLocalAtomicLongApiSelfTest.class));
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheEvictionSelfTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheEvictionSelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheEvictionSelfTestSuite.java
index 1ad63ee..94e1447 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheEvictionSelfTestSuite.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheEvictionSelfTestSuite.java
@@ -18,21 +18,17 @@
package org.apache.ignite.testsuites;
import junit.framework.TestSuite;
-import org.apache.ignite.internal.processors.cache.GridCacheMemoryModeSelfTest;
import org.apache.ignite.internal.processors.cache.GridCachePreloadingEvictionsSelfTest;
import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheAtomicNearEvictionSelfTest;
import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheNearEvictionSelfTest;
-import org.apache.ignite.internal.processors.cache.eviction.GridCacheBatchEvictUnswapSelfTest;
import org.apache.ignite.internal.processors.cache.eviction.GridCacheConcurrentEvictionConsistencySelfTest;
import org.apache.ignite.internal.processors.cache.eviction.GridCacheConcurrentEvictionsSelfTest;
-import org.apache.ignite.internal.processors.cache.eviction.GridCacheDistributedEvictionsSelfTest;
import org.apache.ignite.internal.processors.cache.eviction.GridCacheEmptyEntriesLocalSelfTest;
import org.apache.ignite.internal.processors.cache.eviction.GridCacheEmptyEntriesPartitionedSelfTest;
import org.apache.ignite.internal.processors.cache.eviction.GridCacheEvictableEntryEqualsSelfTest;
import org.apache.ignite.internal.processors.cache.eviction.GridCacheEvictionFilterSelfTest;
import org.apache.ignite.internal.processors.cache.eviction.GridCacheEvictionLockUnlockSelfTest;
import org.apache.ignite.internal.processors.cache.eviction.GridCacheEvictionTouchSelfTest;
-import org.apache.ignite.internal.processors.cache.eviction.GridCacheSynchronousEvictionsFailoverSelfTest;
import org.apache.ignite.internal.processors.cache.eviction.fifo.FifoEvictionPolicySelfTest;
import org.apache.ignite.internal.processors.cache.eviction.lru.LruEvictionPolicySelfTest;
import org.apache.ignite.internal.processors.cache.eviction.lru.LruNearEvictionPolicySelfTest;
@@ -61,14 +57,10 @@ public class IgniteCacheEvictionSelfTestSuite extends TestSuite {
suite.addTest(new TestSuite(GridCacheConcurrentEvictionsSelfTest.class));
suite.addTest(new TestSuite(GridCacheConcurrentEvictionConsistencySelfTest.class));
suite.addTest(new TestSuite(GridCacheEvictionTouchSelfTest.class));
- suite.addTest(new TestSuite(GridCacheDistributedEvictionsSelfTest.class));
suite.addTest(new TestSuite(GridCacheEvictionLockUnlockSelfTest.class));
- suite.addTest(new TestSuite(GridCacheBatchEvictUnswapSelfTest.class));
suite.addTest(new TestSuite(GridCachePreloadingEvictionsSelfTest.class));
suite.addTest(new TestSuite(GridCacheEmptyEntriesPartitionedSelfTest.class));
suite.addTest(new TestSuite(GridCacheEmptyEntriesLocalSelfTest.class));
- suite.addTest(new TestSuite(GridCacheMemoryModeSelfTest.class));
- suite.addTest(new TestSuite(GridCacheSynchronousEvictionsFailoverSelfTest.class));
suite.addTest(new TestSuite(GridCacheEvictableEntryEqualsSelfTest.class));
return suite;
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFullApiMultiJvmSelfTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFullApiMultiJvmSelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFullApiMultiJvmSelfTestSuite.java
index b621ce5..896bb0e 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFullApiMultiJvmSelfTestSuite.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFullApiMultiJvmSelfTestSuite.java
@@ -30,13 +30,11 @@ import org.apache.ignite.internal.processors.cache.multijvm.GridCacheAtomicNearE
import org.apache.ignite.internal.processors.cache.multijvm.GridCacheAtomicNearEnabledPrimaryWriteOrderMultiJvmFullApiSelfTest;
import org.apache.ignite.internal.processors.cache.multijvm.GridCacheAtomicNearOnlyMultiJvmFullApiSelfTest;
import org.apache.ignite.internal.processors.cache.multijvm.GridCacheAtomicNearOnlyMultiJvmP2PDisabledFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.multijvm.GridCacheAtomicOffHeapMultiJvmFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.multijvm.GridCacheAtomicOffHeapTieredMultiJvmFullApiSelfTest;
+import org.apache.ignite.internal.processors.cache.multijvm.GridCacheAtomicOnheapMultiJvmFullApiSelfTest;
import org.apache.ignite.internal.processors.cache.multijvm.GridCacheAtomicPrimaryWriteOrderFairAffinityMultiJvmFullApiSelfTest;
import org.apache.ignite.internal.processors.cache.multijvm.GridCacheAtomicPrimaryWriteOrderMultiJvmFullApiSelfTest;
import org.apache.ignite.internal.processors.cache.multijvm.GridCacheAtomicPrimaryWriteOrderMultiJvmP2PDisabledFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.multijvm.GridCacheAtomicPrimaryWrityOrderOffHeapMultiJvmFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.multijvm.GridCacheAtomicPrimaryWrityOrderOffHeapTieredMultiJvmFullApiSelfTest;
+import org.apache.ignite.internal.processors.cache.multijvm.GridCacheAtomicPrimaryWriteOrderOnheapMultiJvmFullApiSelfTest;
import org.apache.ignite.internal.processors.cache.multijvm.GridCacheNearOnlyFairAffinityMultiJvmFullApiSelfTest;
import org.apache.ignite.internal.processors.cache.multijvm.GridCacheNearOnlyMultiJvmFullApiSelfTest;
import org.apache.ignite.internal.processors.cache.multijvm.GridCacheNearOnlyMultiJvmP2PDisabledFullApiSelfTest;
@@ -44,21 +42,18 @@ import org.apache.ignite.internal.processors.cache.multijvm.GridCachePartitioned
import org.apache.ignite.internal.processors.cache.multijvm.GridCachePartitionedFairAffinityMultiJvmFullApiSelfTest;
import org.apache.ignite.internal.processors.cache.multijvm.GridCachePartitionedMultiJvmFullApiSelfTest;
import org.apache.ignite.internal.processors.cache.multijvm.GridCachePartitionedMultiJvmP2PDisabledFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.multijvm.GridCachePartitionedNearDisabledAtomicOffHeapTieredMultiJvmFullApiSelfTest;
+import org.apache.ignite.internal.processors.cache.multijvm.GridCachePartitionedNearDisabledAtomicOnheapMultiJvmFullApiSelfTest;
import org.apache.ignite.internal.processors.cache.multijvm.GridCachePartitionedNearDisabledFairAffinityMultiJvmFullApiSelfTest;
import org.apache.ignite.internal.processors.cache.multijvm.GridCachePartitionedNearDisabledMultiJvmFullApiSelfTest;
import org.apache.ignite.internal.processors.cache.multijvm.GridCachePartitionedNearDisabledMultiJvmP2PDisabledFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.multijvm.GridCachePartitionedNearDisabledOffHeapMultiJvmFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.multijvm.GridCachePartitionedNearDisabledOffHeapTieredMultiJvmFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.multijvm.GridCachePartitionedOffHeapMultiJvmFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.multijvm.GridCachePartitionedOffHeapTieredMultiJvmFullApiSelfTest;
+import org.apache.ignite.internal.processors.cache.multijvm.GridCachePartitionedNearDisabledOnheapMultiJvmFullApiSelfTest;
+import org.apache.ignite.internal.processors.cache.multijvm.GridCachePartitionedOnheapMultiJvmFullApiSelfTest;
import org.apache.ignite.internal.processors.cache.multijvm.GridCacheReplicatedAtomicMultiJvmFullApiSelfTest;
import org.apache.ignite.internal.processors.cache.multijvm.GridCacheReplicatedAtomicPrimaryWriteOrderMultiJvmFullApiSelfTest;
import org.apache.ignite.internal.processors.cache.multijvm.GridCacheReplicatedMultiJvmFullApiSelfTest;
import org.apache.ignite.internal.processors.cache.multijvm.GridCacheReplicatedMultiJvmP2PDisabledFullApiSelfTest;
import org.apache.ignite.internal.processors.cache.multijvm.GridCacheReplicatedNearOnlyMultiJvmFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.multijvm.GridCacheReplicatedOffHeapMultiJvmFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.multijvm.GridCacheReplicatedOffHeapTieredMultiJvmFullApiSelfTest;
+import org.apache.ignite.internal.processors.cache.multijvm.GridCacheReplicatedOnheapMultiJvmFullApiSelfTest;
/**
* Multi-JVM test suite.
@@ -111,20 +106,12 @@ public class IgniteCacheFullApiMultiJvmSelfTestSuite extends TestSuite {
suite.addTestSuite(GridCacheNearOnlyFairAffinityMultiJvmFullApiSelfTest.class);
suite.addTestSuite(GridCacheAtomicClientOnlyFairAffinityMultiJvmFullApiSelfTest.class);
- // Multi-node with off-heap values.
- suite.addTestSuite(GridCacheReplicatedOffHeapMultiJvmFullApiSelfTest.class);
- suite.addTestSuite(GridCachePartitionedOffHeapMultiJvmFullApiSelfTest.class);
- suite.addTestSuite(GridCacheAtomicOffHeapMultiJvmFullApiSelfTest.class);
- suite.addTestSuite(GridCacheAtomicPrimaryWrityOrderOffHeapMultiJvmFullApiSelfTest.class);
- suite.addTestSuite(GridCachePartitionedNearDisabledOffHeapMultiJvmFullApiSelfTest.class);
-
- // Multi-node with off-heap tiered mode.
- suite.addTestSuite(GridCacheReplicatedOffHeapTieredMultiJvmFullApiSelfTest.class);
- suite.addTestSuite(GridCachePartitionedOffHeapTieredMultiJvmFullApiSelfTest.class);
- suite.addTestSuite(GridCacheAtomicOffHeapTieredMultiJvmFullApiSelfTest.class);
- suite.addTestSuite(GridCacheAtomicPrimaryWrityOrderOffHeapTieredMultiJvmFullApiSelfTest.class);
- suite.addTestSuite(GridCachePartitionedNearDisabledOffHeapTieredMultiJvmFullApiSelfTest.class);
- suite.addTestSuite(GridCachePartitionedNearDisabledAtomicOffHeapTieredMultiJvmFullApiSelfTest.class);
+ suite.addTestSuite(GridCacheAtomicOnheapMultiJvmFullApiSelfTest.class);
+ suite.addTestSuite(GridCachePartitionedNearDisabledAtomicOnheapMultiJvmFullApiSelfTest.class);
+ suite.addTestSuite(GridCachePartitionedNearDisabledOnheapMultiJvmFullApiSelfTest.class);
+ suite.addTestSuite(GridCachePartitionedOnheapMultiJvmFullApiSelfTest.class);
+ suite.addTestSuite(GridCacheReplicatedOnheapMultiJvmFullApiSelfTest.class);
+ suite.addTestSuite(GridCacheAtomicPrimaryWriteOrderOnheapMultiJvmFullApiSelfTest.class);
return suite;
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFullApiSelfTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFullApiSelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFullApiSelfTestSuite.java
index 96a8a33..fa11f24 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFullApiSelfTestSuite.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFullApiSelfTestSuite.java
@@ -22,20 +22,20 @@ import org.apache.ignite.internal.processors.cache.GridCacheClearSelfTest;
import org.apache.ignite.internal.processors.cache.distributed.dht.GridCacheAtomicFullApiSelfTest;
import org.apache.ignite.internal.processors.cache.distributed.dht.GridCacheAtomicNearEnabledFullApiSelfTest;
import org.apache.ignite.internal.processors.cache.distributed.dht.GridCacheAtomicNearEnabledPrimaryWriteOrderFullApiSelfTest;
+import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheAtomicOnheapFullApiSelfTest;
+import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheAtomicOnheapMultiNodeFullApiSelfTest;
import org.apache.ignite.internal.processors.cache.distributed.dht.GridCacheAtomicPrimaryWriteOrderFullApiSelfTest;
import org.apache.ignite.internal.processors.cache.distributed.dht.GridCacheAtomicPrimaryWriteOrderReloadAllSelfTest;
import org.apache.ignite.internal.processors.cache.distributed.dht.GridCacheAtomicReloadAllSelfTest;
import org.apache.ignite.internal.processors.cache.distributed.dht.GridCacheColocatedReloadAllSelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.dht.GridCachePartitionedNearDisabledAtomicOffHeapTieredMultiNodeFullApiSelfTest;
+import org.apache.ignite.internal.processors.cache.distributed.dht.GridCachePartitionedNearDisabledAtomicOnheapFullApiSelfTest;
+import org.apache.ignite.internal.processors.cache.distributed.dht.GridCachePartitionedNearDisabledAtomicOnheapMultiNodeFullApiSelfTest;
import org.apache.ignite.internal.processors.cache.distributed.dht.GridCachePartitionedNearDisabledFairAffinityMultiNodeFullApiSelfTest;
import org.apache.ignite.internal.processors.cache.distributed.dht.GridCachePartitionedNearDisabledFullApiSelfTest;
import org.apache.ignite.internal.processors.cache.distributed.dht.GridCachePartitionedNearDisabledMultiNodeFullApiSelfTest;
import org.apache.ignite.internal.processors.cache.distributed.dht.GridCachePartitionedNearDisabledMultiNodeP2PDisabledFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.dht.GridCachePartitionedNearDisabledOffHeapFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.dht.GridCachePartitionedNearDisabledOffHeapMultiNodeFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.dht.GridCachePartitionedNearDisabledOffHeapTieredAtomicFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.dht.GridCachePartitionedNearDisabledOffHeapTieredFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.dht.GridCachePartitionedNearDisabledOffHeapTieredMultiNodeFullApiSelfTest;
+import org.apache.ignite.internal.processors.cache.distributed.dht.GridCachePartitionedNearDisabledOnheapFullApiSelfTest;
+import org.apache.ignite.internal.processors.cache.distributed.dht.GridCachePartitionedNearDisabledOnheapMultiNodeFullApiSelfTest;
import org.apache.ignite.internal.processors.cache.distributed.near.CachePartitionedMultiNodeLongTxTimeoutFullApiTest;
import org.apache.ignite.internal.processors.cache.distributed.near.CachePartitionedNearEnabledMultiNodeLongTxTimeoutFullApiTest;
import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheAtomicClientOnlyFairAffinityMultiNodeFullApiSelfTest;
@@ -51,22 +51,18 @@ import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheAto
import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheAtomicNearEnabledPrimaryWriteOrderMultiNodeFullApiSelfTest;
import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheAtomicNearOnlyMultiNodeFullApiSelfTest;
import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheAtomicNearOnlyMultiNodeP2PDisabledFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheAtomicOffHeapFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheAtomicOffHeapMultiNodeFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheAtomicOffHeapTieredFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheAtomicOffHeapTieredMultiNodeFullApiSelfTest;
import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheAtomicPrimaryWriteOrderFairAffinityMultiNodeFullApiSelfTest;
import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheAtomicPrimaryWriteOrderMultiNodeFullApiSelfTest;
import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheAtomicPrimaryWriteOrderMultiNodeP2PDisabledFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheAtomicPrimaryWriteOrderOffHeapFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheAtomicPrimaryWriteOrderOffHeapTieredFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheAtomicPrimaryWrityOrderOffHeapMultiNodeFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheAtomicPrimaryWrityOrderOffHeapTieredMultiNodeFullApiSelfTest;
+import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheAtomicPrimaryWriteOrderOnheapFullApiSelfTest;
+import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheAtomicPrimaryWriteOrderOnheapMultiNodeFullApiSelfTest;
import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheNearOnlyFairAffinityMultiNodeFullApiSelfTest;
import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheNearOnlyMultiNodeFullApiSelfTest;
import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheNearOnlyMultiNodeP2PDisabledFullApiSelfTest;
import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheNearReloadAllSelfTest;
import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheNearTxMultiNodeSelfTest;
+import org.apache.ignite.internal.processors.cache.distributed.near.GridCachePartitionedAtomicOnheapFullApiSelfTest;
+import org.apache.ignite.internal.processors.cache.distributed.near.GridCachePartitionedAtomicOnheapMultiNodeFullApiSelfTest;
import org.apache.ignite.internal.processors.cache.distributed.near.GridCachePartitionedClientOnlyNoPrimaryFullApiSelfTest;
import org.apache.ignite.internal.processors.cache.distributed.near.GridCachePartitionedCopyOnReadDisabledMultiNodeFullApiSelfTest;
import org.apache.ignite.internal.processors.cache.distributed.near.GridCachePartitionedFilteredPutSelfTest;
@@ -77,10 +73,8 @@ import org.apache.ignite.internal.processors.cache.distributed.near.GridCachePar
import org.apache.ignite.internal.processors.cache.distributed.near.GridCachePartitionedMultiNodeFullApiSelfTest;
import org.apache.ignite.internal.processors.cache.distributed.near.GridCachePartitionedMultiNodeP2PDisabledFullApiSelfTest;
import org.apache.ignite.internal.processors.cache.distributed.near.GridCachePartitionedNearOnlyNoPrimaryFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.near.GridCachePartitionedOffHeapFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.near.GridCachePartitionedOffHeapMultiNodeFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.near.GridCachePartitionedOffHeapTieredFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.near.GridCachePartitionedOffHeapTieredMultiNodeFullApiSelfTest;
+import org.apache.ignite.internal.processors.cache.distributed.near.GridCachePartitionedOnheapFullApiSelfTest;
+import org.apache.ignite.internal.processors.cache.distributed.near.GridCachePartitionedOnheapMultiNodeFullApiSelfTest;
import org.apache.ignite.internal.processors.cache.distributed.replicated.CacheReplicatedFairAffinityExcludeNeighborsMultiNodeFullApiSelfTest;
import org.apache.ignite.internal.processors.cache.distributed.replicated.CacheReplicatedFairAffinityMultiNodeFullApiSelfTest;
import org.apache.ignite.internal.processors.cache.distributed.replicated.CacheReplicatedRendezvousAffinityExcludeNeighborsMultiNodeFullApiSelfTest;
@@ -94,17 +88,9 @@ import org.apache.ignite.internal.processors.cache.distributed.replicated.GridCa
import org.apache.ignite.internal.processors.cache.distributed.replicated.GridCacheReplicatedMultiNodeFullApiSelfTest;
import org.apache.ignite.internal.processors.cache.distributed.replicated.GridCacheReplicatedMultiNodeP2PDisabledFullApiSelfTest;
import org.apache.ignite.internal.processors.cache.distributed.replicated.GridCacheReplicatedNearOnlyMultiNodeFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.replicated.GridCacheReplicatedOffHeapFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.replicated.GridCacheReplicatedOffHeapMultiNodeFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.replicated.GridCacheReplicatedOffHeapTieredFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.replicated.GridCacheReplicatedOffHeapTieredMultiNodeFullApiSelfTest;
import org.apache.ignite.internal.processors.cache.local.GridCacheLocalAtomicFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.local.GridCacheLocalAtomicOffHeapFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.local.GridCacheLocalAtomicOffHeapTieredFullApiSelfTest;
import org.apache.ignite.internal.processors.cache.local.GridCacheLocalFullApiMultithreadedSelfTest;
import org.apache.ignite.internal.processors.cache.local.GridCacheLocalFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.local.GridCacheLocalOffHeapFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.local.GridCacheLocalOffHeapTieredFullApiSelfTest;
/**
* Test suite for cache API.
@@ -129,30 +115,18 @@ public class IgniteCacheFullApiSelfTestSuite extends TestSuite {
suite.addTestSuite(GridCacheReplicatedAtomicFullApiSelfTest.class);
suite.addTestSuite(GridCacheAtomicNearEnabledFullApiSelfTest.class);
suite.addTestSuite(GridCacheAtomicNearEnabledPrimaryWriteOrderFullApiSelfTest.class);
+ suite.addTestSuite(GridCacheAtomicOnheapFullApiSelfTest.class);;
+ suite.addTestSuite(GridCacheAtomicPrimaryWriteOrderOnheapFullApiSelfTest.class);;
+
+ suite.addTestSuite(GridCachePartitionedOnheapFullApiSelfTest.class);
+ suite.addTestSuite(GridCachePartitionedAtomicOnheapFullApiSelfTest.class);
+ suite.addTestSuite(GridCachePartitionedNearDisabledOnheapFullApiSelfTest.class);
+ suite.addTestSuite(GridCachePartitionedNearDisabledAtomicOnheapFullApiSelfTest.class);
// No primary.
suite.addTestSuite(GridCachePartitionedClientOnlyNoPrimaryFullApiSelfTest.class);
suite.addTestSuite(GridCachePartitionedNearOnlyNoPrimaryFullApiSelfTest.class);
- // One node with off-heap values.
- suite.addTestSuite(GridCacheLocalOffHeapFullApiSelfTest.class);
- suite.addTestSuite(GridCacheLocalAtomicOffHeapFullApiSelfTest.class);
- suite.addTestSuite(GridCacheReplicatedOffHeapFullApiSelfTest.class);
- suite.addTestSuite(GridCachePartitionedOffHeapFullApiSelfTest.class);
- suite.addTestSuite(GridCacheAtomicOffHeapFullApiSelfTest.class);
- suite.addTestSuite(GridCacheAtomicPrimaryWriteOrderOffHeapFullApiSelfTest.class);
- suite.addTestSuite(GridCachePartitionedNearDisabledOffHeapFullApiSelfTest.class);
-
- // One node with off-heap tiered mode.
- suite.addTestSuite(GridCacheLocalOffHeapTieredFullApiSelfTest.class);
- suite.addTestSuite(GridCacheLocalAtomicOffHeapTieredFullApiSelfTest.class);
- suite.addTestSuite(GridCacheReplicatedOffHeapTieredFullApiSelfTest.class);
- suite.addTestSuite(GridCachePartitionedOffHeapTieredFullApiSelfTest.class);
- suite.addTestSuite(GridCacheAtomicOffHeapTieredFullApiSelfTest.class);
- suite.addTestSuite(GridCacheAtomicPrimaryWriteOrderOffHeapTieredFullApiSelfTest.class);
- suite.addTestSuite(GridCachePartitionedNearDisabledOffHeapTieredFullApiSelfTest.class);
- suite.addTestSuite(GridCachePartitionedNearDisabledOffHeapTieredAtomicFullApiSelfTest.class);
-
// Multi-node.
suite.addTestSuite(GridCacheReplicatedMultiNodeFullApiSelfTest.class);
suite.addTestSuite(GridCacheReplicatedMultiNodeP2PDisabledFullApiSelfTest.class);
@@ -204,20 +178,12 @@ public class IgniteCacheFullApiSelfTestSuite extends TestSuite {
suite.addTestSuite(GridCacheNearTxMultiNodeSelfTest.class);
suite.addTestSuite(GridCachePartitionedMultiNodeCounterSelfTest.class);
- // Multi-node with off-heap values.
- suite.addTestSuite(GridCacheReplicatedOffHeapMultiNodeFullApiSelfTest.class);
- suite.addTestSuite(GridCachePartitionedOffHeapMultiNodeFullApiSelfTest.class);
- suite.addTestSuite(GridCacheAtomicOffHeapMultiNodeFullApiSelfTest.class);
- suite.addTestSuite(GridCacheAtomicPrimaryWrityOrderOffHeapMultiNodeFullApiSelfTest.class);
- suite.addTestSuite(GridCachePartitionedNearDisabledOffHeapMultiNodeFullApiSelfTest.class);
-
- // Multi-node with off-heap tiered mode.
- suite.addTestSuite(GridCacheReplicatedOffHeapTieredMultiNodeFullApiSelfTest.class);
- suite.addTestSuite(GridCachePartitionedOffHeapTieredMultiNodeFullApiSelfTest.class);
- suite.addTestSuite(GridCacheAtomicOffHeapTieredMultiNodeFullApiSelfTest.class);
- suite.addTestSuite(GridCacheAtomicPrimaryWrityOrderOffHeapTieredMultiNodeFullApiSelfTest.class);
- suite.addTestSuite(GridCachePartitionedNearDisabledOffHeapTieredMultiNodeFullApiSelfTest.class);
- suite.addTestSuite(GridCachePartitionedNearDisabledAtomicOffHeapTieredMultiNodeFullApiSelfTest.class);
+ suite.addTestSuite(GridCachePartitionedOnheapMultiNodeFullApiSelfTest.class);
+ suite.addTestSuite(GridCachePartitionedAtomicOnheapMultiNodeFullApiSelfTest.class);
+ suite.addTestSuite(GridCachePartitionedNearDisabledOnheapMultiNodeFullApiSelfTest.class);
+ suite.addTestSuite(GridCachePartitionedNearDisabledAtomicOnheapMultiNodeFullApiSelfTest.class);
+ suite.addTestSuite(GridCacheAtomicOnheapMultiNodeFullApiSelfTest.class);;
+ suite.addTestSuite(GridCacheAtomicPrimaryWriteOrderOnheapMultiNodeFullApiSelfTest.class);;
// Old affinity assignment mode.
suite.addTestSuite(GridCachePartitionedLateAffDisabledMultiNodeFullApiSelfTest.class);
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMetricsSelfTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMetricsSelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMetricsSelfTestSuite.java
index f3dd1c8..ebcf1df 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMetricsSelfTestSuite.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMetricsSelfTestSuite.java
@@ -27,7 +27,6 @@ import org.apache.ignite.internal.processors.cache.distributed.near.GridCachePar
import org.apache.ignite.internal.processors.cache.distributed.near.GridCachePartitionedMetricsSelfTest;
import org.apache.ignite.internal.processors.cache.distributed.replicated.GridCacheAtomicReplicatedMetricsSelfTest;
import org.apache.ignite.internal.processors.cache.distributed.replicated.GridCacheReplicatedMetricsSelfTest;
-import org.apache.ignite.internal.processors.cache.local.LocalCacheOffHeapAndSwapMetricsSelfTest;
import org.apache.ignite.internal.processors.cache.local.GridCacheAtomicLocalMetricsNoStoreSelfTest;
import org.apache.ignite.internal.processors.cache.local.GridCacheAtomicLocalMetricsSelfTest;
import org.apache.ignite.internal.processors.cache.local.GridCacheAtomicLocalTckMetricsSelfTestImpl;
@@ -49,7 +48,6 @@ public class IgniteCacheMetricsSelfTestSuite extends TestSuite {
suite.addTestSuite(GridCacheReplicatedMetricsSelfTest.class);
suite.addTestSuite(GridCachePartitionedMetricsSelfTest.class);
suite.addTestSuite(GridCachePartitionedHitsAndMissesSelfTest.class);
- suite.addTestSuite(LocalCacheOffHeapAndSwapMetricsSelfTest.class);
// Atomic cache.
suite.addTestSuite(GridCacheAtomicLocalMetricsSelfTest.class);
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite.java
index 8d668b9..5c1a879 100755
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite.java
@@ -19,8 +19,6 @@ package org.apache.ignite.testsuites;
import java.util.Set;
import junit.framework.TestSuite;
-import org.apache.ignite.GridCacheAffinityBackupsSelfTest;
-import org.apache.ignite.IgniteCacheAffinitySelfTest;
import org.apache.ignite.cache.IgniteWarmupClosureSelfTest;
import org.apache.ignite.cache.affinity.AffinityClientNodeSelfTest;
import org.apache.ignite.cache.affinity.AffinityHistoryCleanupTest;
@@ -49,7 +47,6 @@ import org.apache.ignite.cache.store.jdbc.JdbcTypesDefaultTransformerTest;
import org.apache.ignite.internal.processors.cache.CacheAffinityCallSelfTest;
import org.apache.ignite.internal.processors.cache.CacheDeferredDeleteQueueTest;
import org.apache.ignite.internal.processors.cache.CacheDeferredDeleteSanitySelfTest;
-import org.apache.ignite.internal.processors.cache.CacheEntryProcessorCopySelfTest;
import org.apache.ignite.internal.processors.cache.CacheFutureExceptionSelfTest;
import org.apache.ignite.internal.processors.cache.CacheNamesSelfTest;
import org.apache.ignite.internal.processors.cache.CacheNamesWithSpecialCharactersTest;
@@ -76,20 +73,13 @@ import org.apache.ignite.internal.processors.cache.GridCacheNearTxStoreException
import org.apache.ignite.internal.processors.cache.GridCacheObjectToStringSelfTest;
import org.apache.ignite.internal.processors.cache.GridCacheOffHeapAtomicMultiThreadedUpdateSelfTest;
import org.apache.ignite.internal.processors.cache.GridCacheOffHeapMultiThreadedUpdateSelfTest;
-import org.apache.ignite.internal.processors.cache.GridCacheOffHeapTieredAtomicSelfTest;
-import org.apache.ignite.internal.processors.cache.GridCacheOffHeapTieredEvictionAtomicSelfTest;
-import org.apache.ignite.internal.processors.cache.GridCacheOffHeapTieredEvictionSelfTest;
-import org.apache.ignite.internal.processors.cache.GridCacheOffHeapTieredSelfTest;
-import org.apache.ignite.internal.processors.cache.GridCacheP2PUndeploySelfTest;
import org.apache.ignite.internal.processors.cache.GridCachePartitionedLocalStoreSelfTest;
-import org.apache.ignite.internal.processors.cache.GridCachePartitionedOffHeapLocalStoreSelfTest;
import org.apache.ignite.internal.processors.cache.GridCacheReplicatedLocalStoreSelfTest;
import org.apache.ignite.internal.processors.cache.GridCacheReplicatedTxStoreExceptionSelfTest;
import org.apache.ignite.internal.processors.cache.GridCacheStopSelfTest;
import org.apache.ignite.internal.processors.cache.GridCacheStorePutxSelfTest;
import org.apache.ignite.internal.processors.cache.GridCacheStoreValueBytesSelfTest;
import org.apache.ignite.internal.processors.cache.GridCacheSwapPreloadSelfTest;
-import org.apache.ignite.internal.processors.cache.GridCacheTtlManagerEvictionSelfTest;
import org.apache.ignite.internal.processors.cache.GridCacheTtlManagerSelfTest;
import org.apache.ignite.internal.processors.cache.GridCacheTxPartitionedLocalStoreSelfTest;
import org.apache.ignite.internal.processors.cache.IgniteCacheAtomicInvokeTest;
@@ -100,14 +90,10 @@ import org.apache.ignite.internal.processors.cache.IgniteCacheAtomicPrimaryWrite
import org.apache.ignite.internal.processors.cache.IgniteCacheAtomicPrimaryWriteOrderWithStoreInvokeTest;
import org.apache.ignite.internal.processors.cache.IgniteCacheAtomicStopBusySelfTest;
import org.apache.ignite.internal.processors.cache.IgniteCacheEntryListenerAtomicLocalTest;
-import org.apache.ignite.internal.processors.cache.IgniteCacheEntryListenerAtomicOffheapTieredTest;
-import org.apache.ignite.internal.processors.cache.IgniteCacheEntryListenerAtomicOffheapValuesTest;
import org.apache.ignite.internal.processors.cache.IgniteCacheEntryListenerAtomicReplicatedTest;
import org.apache.ignite.internal.processors.cache.IgniteCacheEntryListenerAtomicTest;
import org.apache.ignite.internal.processors.cache.IgniteCacheEntryListenerEagerTtlDisabledTest;
import org.apache.ignite.internal.processors.cache.IgniteCacheEntryListenerTxLocalTest;
-import org.apache.ignite.internal.processors.cache.IgniteCacheEntryListenerTxOffheapTieredTest;
-import org.apache.ignite.internal.processors.cache.IgniteCacheEntryListenerTxOffheapValuesTest;
import org.apache.ignite.internal.processors.cache.IgniteCacheEntryListenerTxReplicatedTest;
import org.apache.ignite.internal.processors.cache.IgniteCacheEntryListenerTxTest;
import org.apache.ignite.internal.processors.cache.IgniteCacheEntryProcessorCallTest;
@@ -185,13 +171,9 @@ public class IgniteCacheTestSuite extends TestSuite {
suite.addTestSuite(IgniteCacheEntryListenerAtomicReplicatedTest.class);
suite.addTestSuite(IgniteCacheEntryListenerAtomicLocalTest.class);
suite.addTestSuite(IgniteCacheEntryListenerTxTest.class);
- suite.addTestSuite(IgniteCacheEntryListenerTxOffheapTieredTest.class);
- suite.addTestSuite(IgniteCacheEntryListenerTxOffheapValuesTest.class);
suite.addTestSuite(IgniteCacheEntryListenerTxReplicatedTest.class);
suite.addTestSuite(IgniteCacheEntryListenerTxLocalTest.class);
suite.addTestSuite(IgniteCacheEntryListenerEagerTtlDisabledTest.class);
- suite.addTestSuite(IgniteCacheEntryListenerAtomicOffheapTieredTest.class);
- suite.addTestSuite(IgniteCacheEntryListenerAtomicOffheapValuesTest.class);
suite.addTestSuite(IgniteClientAffinityAssignmentSelfTest.class);
@@ -276,8 +258,8 @@ public class IgniteCacheTestSuite extends TestSuite {
suite.addTestSuite(GridCacheAsyncOperationsLimitSelfTest.class);
suite.addTestSuite(IgniteCacheManyAsyncOperationsTest.class);
suite.addTestSuite(GridCacheTtlManagerSelfTest.class);
- // TODO GG-11140.
- // suite.addTestSuite(GridCacheTtlManagerEvictionSelfTest.class);
+ // TODO: ignite-4534
+// suite.addTestSuite(GridCacheTtlManagerEvictionSelfTest.class);
suite.addTestSuite(GridCacheLifecycleAwareSelfTest.class);
suite.addTestSuite(IgniteCacheAtomicStopBusySelfTest.class);
suite.addTestSuite(IgniteCacheTransactionalStopBusySelfTest.class);
@@ -302,14 +284,9 @@ public class IgniteCacheTestSuite extends TestSuite {
suite.addTestSuite(IgniteCacheMessageRecoveryIdleConnectionTest.class);
suite.addTestSuite(IgniteCacheConnectionRecoveryTest.class);
suite.addTestSuite(IgniteCacheConnectionRecovery10ConnectionsTest.class);
- GridTestUtils.addTestIfNeeded(suite, GridCacheOffHeapTieredEvictionAtomicSelfTest.class, ignoredTests);
- GridTestUtils.addTestIfNeeded(suite, GridCacheOffHeapTieredEvictionSelfTest.class, ignoredTests);
- GridTestUtils.addTestIfNeeded(suite, GridCacheOffHeapTieredAtomicSelfTest.class, ignoredTests);
- GridTestUtils.addTestIfNeeded(suite, GridCacheOffHeapTieredSelfTest.class, ignoredTests);
suite.addTestSuite(GridCacheGlobalLoadTest.class);
suite.addTestSuite(GridCachePartitionedLocalStoreSelfTest.class);
suite.addTestSuite(GridCacheReplicatedLocalStoreSelfTest.class);
- suite.addTestSuite(GridCachePartitionedOffHeapLocalStoreSelfTest.class);
suite.addTestSuite(GridCacheTxPartitionedLocalStoreSelfTest.class);
suite.addTestSuite(IgniteCacheSystemTransactionsSelfTest.class);
suite.addTestSuite(CacheDeferredDeleteSanitySelfTest.class);
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/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 a9df142..1c50908 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
@@ -50,7 +50,6 @@ import org.apache.ignite.internal.processors.cache.distributed.GridCachePartitio
import org.apache.ignite.internal.processors.cache.distributed.GridCacheTransformEventSelfTest;
import org.apache.ignite.internal.processors.cache.distributed.IgniteCacheClientNodeChangingTopologyTest;
import org.apache.ignite.internal.processors.cache.distributed.IgniteCacheClientNodePartitionsExchangeTest;
-import org.apache.ignite.internal.processors.cache.distributed.IgniteCacheNearOffheapGetSelfTest;
import org.apache.ignite.internal.processors.cache.distributed.IgniteCacheServerNodeConcurrentStart;
import org.apache.ignite.internal.processors.cache.distributed.dht.GridCacheColocatedOptimisticTransactionSelfTest;
import org.apache.ignite.internal.processors.cache.distributed.dht.GridCacheColocatedPreloadRestartSelfTest;
@@ -63,7 +62,7 @@ import org.apache.ignite.internal.processors.cache.distributed.dht.GridCacheDhtP
import org.apache.ignite.internal.processors.cache.distributed.dht.GridCacheDhtPreloadDelayedSelfTest;
import org.apache.ignite.internal.processors.cache.distributed.dht.GridCacheDhtPreloadDisabledSelfTest;
import org.apache.ignite.internal.processors.cache.distributed.dht.GridCacheDhtPreloadMultiThreadedSelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.dht.GridCacheDhtPreloadOffHeapSelfTest;
+import org.apache.ignite.internal.processors.cache.distributed.dht.GridCacheDhtPreloadOnheapSelfTest;
import org.apache.ignite.internal.processors.cache.distributed.dht.GridCacheDhtPreloadPutGetSelfTest;
import org.apache.ignite.internal.processors.cache.distributed.dht.GridCacheDhtPreloadSelfTest;
import org.apache.ignite.internal.processors.cache.distributed.dht.GridCacheDhtPreloadStartStopSelfTest;
@@ -73,8 +72,10 @@ 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.GridCacheNearJobExecutionSelfTest;
import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheNearMultiGetSelfTest;
import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheNearMultiNodeSelfTest;
@@ -108,7 +109,6 @@ import org.apache.ignite.internal.processors.cache.distributed.near.GridCachePar
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.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;
@@ -118,6 +118,7 @@ import org.apache.ignite.internal.processors.cache.local.GridCacheLocalAtomicGet
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;
@@ -151,8 +152,7 @@ public class IgniteCacheTestSuite2 extends TestSuite {
suite.addTestSuite(GridCacheLocalTxSingleThreadedSelfTest.class);
suite.addTestSuite(GridCacheLocalTxTimeoutSelfTest.class);
suite.addTestSuite(GridCacheLocalEventSelfTest.class);
- // TODO TODO GG-11140.
- // suite.addTestSuite(GridCacheLocalEvictionEventSelfTest.class);
+ suite.addTestSuite(GridCacheLocalEvictionEventSelfTest.class);
suite.addTestSuite(GridCacheVariableTopologySelfTest.class);
suite.addTestSuite(GridCacheLocalTxMultiThreadedSelfTest.class);
suite.addTestSuite(GridCacheTransformEventSelfTest.class);
@@ -199,7 +199,7 @@ public class IgniteCacheTestSuite2 extends TestSuite {
suite.addTest(new TestSuite(GridCachePartitionedTxMultiThreadedSelfTest.class));
suite.addTest(new TestSuite(GridCachePartitionedNearDisabledTxMultiThreadedSelfTest.class));
suite.addTest(new TestSuite(GridCacheDhtPreloadSelfTest.class));
- suite.addTest(new TestSuite(GridCacheDhtPreloadOffHeapSelfTest.class));
+ suite.addTest(new TestSuite(GridCacheDhtPreloadOnheapSelfTest.class));
suite.addTest(new TestSuite(GridCacheDhtPreloadBigDataSelfTest.class));
suite.addTest(new TestSuite(GridCacheDhtPreloadPutGetSelfTest.class));
suite.addTest(new TestSuite(GridCacheDhtPreloadDisabledSelfTest.class));
@@ -219,13 +219,9 @@ public class IgniteCacheTestSuite2 extends TestSuite {
suite.addTest(new TestSuite(GridCachePartitionedLoadCacheSelfTest.class));
suite.addTest(new TestSuite(GridCachePartitionNotLoadedEventSelfTest.class));
suite.addTest(new TestSuite(GridCacheDhtEvictionsDisabledSelfTest.class));
- // TODO GG-11140.
- // suite.addTest(new TestSuite(GridCacheNearEvictionEventSelfTest.class));
- // suite.addTest(new TestSuite(GridCacheAtomicNearEvictionEventSelfTest.class));
- // suite.addTest(new TestSuite(GridCacheDhtEvictionSelfTest.class));
- // suite.addTest(new TestSuite(GridCacheReplicatedEvictionSelfTest.class));
- // suite.addTest(new TestSuite(GridCacheDhtEvictionNearReadersSelfTest.class));
- // suite.addTest(new TestSuite(GridCacheDhtAtomicEvictionNearReadersSelfTest.class));
+ suite.addTest(new TestSuite(GridCacheNearEvictionEventSelfTest.class));
+ suite.addTest(new TestSuite(GridCacheAtomicNearEvictionEventSelfTest.class));
+
suite.addTest(new TestSuite(GridCachePartitionedTopologyChangeSelfTest.class));
suite.addTest(new TestSuite(GridCachePartitionedPreloadEventsSelfTest.class));
suite.addTest(new TestSuite(GridCachePartitionedUnloadEventsSelfTest.class));
@@ -233,7 +229,6 @@ public class IgniteCacheTestSuite2 extends TestSuite {
suite.addTest(new TestSuite(GridCacheColocatedOptimisticTransactionSelfTest.class));
suite.addTestSuite(GridCacheAtomicMessageCountSelfTest.class);
suite.addTest(new TestSuite(GridCacheNearPartitionedClearSelfTest.class));
- suite.addTest(new TestSuite(IgniteCacheNearOffheapGetSelfTest.class));
suite.addTest(new TestSuite(GridCacheOffheapUpdateSelfTest.class));
@@ -266,7 +261,6 @@ public class IgniteCacheTestSuite2 extends TestSuite {
suite.addTest(new TestSuite(CacheConcurrentReadThroughTest.class));
suite.addTest(new TestSuite(GridNearCacheStoreUpdateTest.class));
- suite.addTest(new TestSuite(GridNearOffheapCacheStoreUpdateTest.class));
return suite;
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite3.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite3.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite3.java
index 4b5e2f6..caa18d0 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite3.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite3.java
@@ -21,9 +21,6 @@ import junit.framework.TestSuite;
import org.apache.ignite.internal.processors.cache.CacheStartupInDeploymentModesTest;
import org.apache.ignite.internal.processors.cache.GridCacheAtomicEntryProcessorDeploymentSelfTest;
import org.apache.ignite.internal.processors.cache.GridCacheConditionalDeploymentSelfTest;
-import org.apache.ignite.internal.processors.cache.GridCacheDeploymentOffHeapSelfTest;
-import org.apache.ignite.internal.processors.cache.GridCacheDeploymentOffHeapValuesSelfTest;
-import org.apache.ignite.internal.processors.cache.GridCacheDeploymentSelfTest;
import org.apache.ignite.internal.processors.cache.GridCacheEntryVersionSelfTest;
import org.apache.ignite.internal.processors.cache.GridCacheOrderedPreloadingSelfTest;
import org.apache.ignite.internal.processors.cache.GridCacheReferenceCleanupSelfTest;
@@ -80,7 +77,6 @@ import org.apache.ignite.internal.processors.cache.distributed.replicated.GridCa
import org.apache.ignite.internal.processors.cache.distributed.replicated.GridCacheSyncReplicatedPreloadSelfTest;
import org.apache.ignite.internal.processors.cache.distributed.replicated.GridReplicatedTxPreloadTest;
import org.apache.ignite.internal.processors.cache.distributed.replicated.preloader.GridCacheReplicatedPreloadLifecycleSelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.replicated.preloader.GridCacheReplicatedPreloadOffHeapSelfTest;
import org.apache.ignite.internal.processors.cache.distributed.replicated.preloader.GridCacheReplicatedPreloadSelfTest;
import org.apache.ignite.internal.processors.cache.distributed.replicated.preloader.GridCacheReplicatedPreloadStartStopEventsSelfTest;
import org.apache.ignite.internal.processors.cache.local.GridCacheDaemonNodeLocalSelfTest;
@@ -122,7 +118,6 @@ public class IgniteCacheTestSuite3 extends TestSuite {
suite.addTestSuite(GridCacheReplicatedTxSingleThreadedSelfTest.class);
suite.addTestSuite(GridCacheReplicatedTxTimeoutSelfTest.class);
suite.addTestSuite(GridCacheReplicatedPreloadSelfTest.class);
- suite.addTestSuite(GridCacheReplicatedPreloadOffHeapSelfTest.class);
suite.addTestSuite(GridCacheReplicatedPreloadLifecycleSelfTest.class);
suite.addTestSuite(GridCacheSyncReplicatedPreloadSelfTest.class);
@@ -138,8 +133,7 @@ public class IgniteCacheTestSuite3 extends TestSuite {
suite.addTestSuite(GridCachePutArrayValueSelfTest.class);
suite.addTestSuite(GridCacheReplicatedUnswapAdvancedSelfTest.class);
- // TODO TODO GG-11140.
- // suite.addTestSuite(GridCacheReplicatedEvictionEventSelfTest.class);
+ suite.addTestSuite(GridCacheReplicatedEvictionEventSelfTest.class);
suite.addTestSuite(GridCacheReplicatedTxMultiThreadedSelfTest.class);
suite.addTestSuite(GridCacheReplicatedPreloadEventsSelfTest.class);
suite.addTestSuite(GridCacheReplicatedPreloadStartStopEventsSelfTest.class);
@@ -184,8 +178,7 @@ public class IgniteCacheTestSuite3 extends TestSuite {
// Memory leak tests.
suite.addTestSuite(GridCacheReferenceCleanupSelfTest.class);
- // TODO GG-11140.
- // suite.addTestSuite(GridCacheReloadSelfTest.class);
+ suite.addTestSuite(GridCacheReloadSelfTest.class);
suite.addTestSuite(GridCacheMixedModeSelfTest.class);
@@ -196,8 +189,7 @@ public class IgniteCacheTestSuite3 extends TestSuite {
suite.addTest(IgniteTopologyValidatorTestSuit.suite());
// Eviction.
- // TODO GG-11140.
- // suite.addTest(IgniteCacheEvictionSelfTestSuite.suite());
+ suite.addTest(IgniteCacheEvictionSelfTestSuite.suite());
// Iterators.
suite.addTest(IgniteCacheIteratorsSelfTestSuite.suite());
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite4.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite4.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite4.java
index 3abbdab..bd26f03 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite4.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite4.java
@@ -41,7 +41,6 @@ import org.apache.ignite.internal.processors.cache.CacheStoreUsageMultinodeDynam
import org.apache.ignite.internal.processors.cache.CacheStoreUsageMultinodeDynamicStartTxTest;
import org.apache.ignite.internal.processors.cache.CacheStoreUsageMultinodeStaticStartAtomicTest;
import org.apache.ignite.internal.processors.cache.CacheStoreUsageMultinodeStaticStartTxTest;
-import org.apache.ignite.internal.processors.cache.CacheSwapUnswapGetTest;
import org.apache.ignite.internal.processors.cache.CacheTxNotAllowReadFromBackupTest;
import org.apache.ignite.internal.processors.cache.CrossCacheLockTest;
import org.apache.ignite.internal.processors.cache.GridCacheMarshallingNodeJoinSelfTest;
@@ -131,13 +130,9 @@ import org.apache.ignite.internal.processors.cache.integration.IgniteCacheTxStor
import org.apache.ignite.internal.processors.cache.integration.IgniteCacheTxStoreSessionWriteBehindTest;
import org.apache.ignite.internal.processors.cache.version.CacheVersionedEntryLocalAtomicSwapDisabledSelfTest;
import org.apache.ignite.internal.processors.cache.version.CacheVersionedEntryLocalTransactionalSelfTest;
-import org.apache.ignite.internal.processors.cache.version.CacheVersionedEntryPartitionedAtomicOffHeapSelfTest;
import org.apache.ignite.internal.processors.cache.version.CacheVersionedEntryPartitionedAtomicSelfTest;
-import org.apache.ignite.internal.processors.cache.version.CacheVersionedEntryPartitionedTransactionalOffHeapSelfTest;
import org.apache.ignite.internal.processors.cache.version.CacheVersionedEntryPartitionedTransactionalSelfTest;
-import org.apache.ignite.internal.processors.cache.version.CacheVersionedEntryReplicatedAtomicOffHeapSelfTest;
import org.apache.ignite.internal.processors.cache.version.CacheVersionedEntryReplicatedAtomicSelfTest;
-import org.apache.ignite.internal.processors.cache.version.CacheVersionedEntryReplicatedTransactionalOffHeapSelfTest;
import org.apache.ignite.internal.processors.cache.version.CacheVersionedEntryReplicatedTransactionalSelfTest;
/**
@@ -290,12 +285,8 @@ public class IgniteCacheTestSuite4 extends TestSuite {
suite.addTestSuite(CacheVersionedEntryLocalTransactionalSelfTest.class);
suite.addTestSuite(CacheVersionedEntryPartitionedAtomicSelfTest.class);
suite.addTestSuite(CacheVersionedEntryPartitionedTransactionalSelfTest.class);
- suite.addTestSuite(CacheVersionedEntryPartitionedAtomicOffHeapSelfTest.class);
- suite.addTestSuite(CacheVersionedEntryPartitionedTransactionalOffHeapSelfTest.class);
suite.addTestSuite(CacheVersionedEntryReplicatedAtomicSelfTest.class);
suite.addTestSuite(CacheVersionedEntryReplicatedTransactionalSelfTest.class);
- suite.addTestSuite(CacheVersionedEntryReplicatedAtomicOffHeapSelfTest.class);
- suite.addTestSuite(CacheVersionedEntryReplicatedTransactionalOffHeapSelfTest.class);
// TODO GG-11148.
// suite.addTestSuite(CacheSwapUnswapGetTest.class);
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteIgfsTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteIgfsTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteIgfsTestSuite.java
index 76ed440..7efc7de 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteIgfsTestSuite.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteIgfsTestSuite.java
@@ -21,8 +21,6 @@ import junit.framework.TestSuite;
import org.apache.ignite.igfs.IgfsFragmentizerSelfTest;
import org.apache.ignite.igfs.IgfsFragmentizerTopologySelfTest;
import org.apache.ignite.internal.processors.igfs.IgfsAtomicPrimaryMultiNodeSelfTest;
-import org.apache.ignite.internal.processors.igfs.IgfsAtomicPrimaryOffheapTieredSelfTest;
-import org.apache.ignite.internal.processors.igfs.IgfsAtomicPrimaryOffheapValuesSelfTest;
import org.apache.ignite.internal.processors.igfs.IgfsAtomicPrimarySelfTest;
import org.apache.ignite.internal.processors.igfs.IgfsAttributesSelfTest;
import org.apache.ignite.internal.processors.igfs.IgfsBackupsDualAsyncSelfTest;
@@ -48,8 +46,6 @@ import org.apache.ignite.internal.processors.igfs.IgfsModeResolverSelfTest;
import org.apache.ignite.internal.processors.igfs.IgfsModesSelfTest;
import org.apache.ignite.internal.processors.igfs.IgfsPrimaryMultiNodeSelfTest;
import org.apache.ignite.internal.processors.igfs.IgfsOneClientNodeTest;
-import org.apache.ignite.internal.processors.igfs.IgfsPrimaryOffheapTieredSelfTest;
-import org.apache.ignite.internal.processors.igfs.IgfsPrimaryOffheapValuesSelfTest;
import org.apache.ignite.internal.processors.igfs.IgfsPrimaryOptimziedMarshallerSelfTest;
import org.apache.ignite.internal.processors.igfs.IgfsPrimaryRelaxedConsistencyClientSelfTest;
import org.apache.ignite.internal.processors.igfs.IgfsPrimaryRelaxedConsistencyMultiNodeSelfTest;
@@ -95,9 +91,6 @@ public class IgniteIgfsTestSuite extends TestSuite {
suite.addTest(new TestSuite(IgfsPrimaryOptimziedMarshallerSelfTest.class));
- suite.addTest(new TestSuite(IgfsPrimaryOffheapTieredSelfTest.class));
- suite.addTest(new TestSuite(IgfsPrimaryOffheapValuesSelfTest.class));
-
suite.addTest(new TestSuite(IgfsDualSyncSelfTest.class));
suite.addTest(new TestSuite(IgfsDualAsyncSelfTest.class));
@@ -165,8 +158,6 @@ public class IgniteIgfsTestSuite extends TestSuite {
suite.addTestSuite(IgfsAtomicPrimarySelfTest.class);
suite.addTestSuite(IgfsAtomicPrimaryMultiNodeSelfTest.class);
- suite.addTestSuite(IgfsAtomicPrimaryOffheapTieredSelfTest.class);
- suite.addTestSuite(IgfsAtomicPrimaryOffheapValuesSelfTest.class);
suite.addTestSuite(IgfsSecondaryFileSystemInjectionSelfTest.class);
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/HadoopAbstractMapReduceTest.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/HadoopAbstractMapReduceTest.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/HadoopAbstractMapReduceTest.java
index 12e1257..4928e3d 100644
--- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/HadoopAbstractMapReduceTest.java
+++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/HadoopAbstractMapReduceTest.java
@@ -376,7 +376,6 @@ public class HadoopAbstractMapReduceTest extends HadoopAbstractWordCountTest {
dataCacheCfg.setAffinityMapper(new IgfsGroupDataBlocksKeyMapper(2));
dataCacheCfg.setBackups(0);
dataCacheCfg.setAtomicityMode(TRANSACTIONAL);
- dataCacheCfg.setOffHeapMaxMemory(0);
CacheConfiguration metaCacheCfg = defaultCacheConfiguration();
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/HadoopFIleSystemFactorySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/HadoopFIleSystemFactorySelfTest.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/HadoopFIleSystemFactorySelfTest.java
index 2e3a2a3..6b5690c 100644
--- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/HadoopFIleSystemFactorySelfTest.java
+++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/HadoopFIleSystemFactorySelfTest.java
@@ -235,7 +235,6 @@ public class HadoopFIleSystemFactorySelfTest extends IgfsCommonAbstractTest {
dataCacheCfg.setAffinityMapper(new IgfsGroupDataBlocksKeyMapper(2));
dataCacheCfg.setBackups(0);
dataCacheCfg.setAtomicityMode(TRANSACTIONAL);
- dataCacheCfg.setOffHeapMaxMemory(0);
CacheConfiguration metaCacheCfg = defaultCacheConfiguration();
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/HadoopIgfsDualAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/HadoopIgfsDualAbstractSelfTest.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/HadoopIgfsDualAbstractSelfTest.java
index ad6a9f4..3ffdf23 100644
--- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/HadoopIgfsDualAbstractSelfTest.java
+++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/HadoopIgfsDualAbstractSelfTest.java
@@ -169,7 +169,6 @@ public abstract class HadoopIgfsDualAbstractSelfTest extends IgfsCommonAbstractT
dataCacheCfg.setAffinityMapper(new IgfsGroupDataBlocksKeyMapper(2));
dataCacheCfg.setBackups(0);
dataCacheCfg.setAtomicityMode(TRANSACTIONAL);
- dataCacheCfg.setOffHeapMaxMemory(0);
CacheConfiguration metaCacheCfg = defaultCacheConfiguration();
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheIndexStreamerTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheIndexStreamerTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheIndexStreamerTest.java
index 7477341..d5065e1 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheIndexStreamerTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheIndexStreamerTest.java
@@ -36,7 +36,6 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
/**
@@ -139,8 +138,6 @@ public class CacheIndexStreamerTest extends GridCommonAbstractTest {
ccfg.setAtomicityMode(atomicityMode);
ccfg.setWriteSynchronizationMode(FULL_SYNC);
- ccfg.setMemoryMode(OFFHEAP_TIERED);
- ccfg.setOffHeapMaxMemory(0);
ccfg.setBackups(1);
ccfg.setIndexedTypes(Integer.class, String.class);
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheIndexingOffheapCleanupTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheIndexingOffheapCleanupTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheIndexingOffheapCleanupTest.java
deleted file mode 100644
index 70c0d49..0000000
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheIndexingOffheapCleanupTest.java
+++ /dev/null
@@ -1,157 +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.Map;
-import java.util.concurrent.ThreadLocalRandom;
-import org.apache.ignite.Ignite;
-import org.apache.ignite.IgniteCache;
-import org.apache.ignite.cache.query.annotations.QuerySqlField;
-import org.apache.ignite.cache.query.annotations.QueryTextField;
-import org.apache.ignite.configuration.CacheConfiguration;
-import org.apache.ignite.internal.IgniteKernal;
-import org.apache.ignite.internal.util.offheap.unsafe.GridUnsafeMemory;
-import org.apache.ignite.testframework.GridTestUtils;
-import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
-
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
-
-/**
- *
- */
-public class CacheIndexingOffheapCleanupTest extends GridCommonAbstractTest {
- /** {@inheritDoc} */
- @Override protected void beforeTest() throws Exception {
- startGrid(0);
- }
-
- /** {@inheritDoc} */
- @Override protected void afterTest() throws Exception {
- stopAllGrids();
-
- super.afterTest();
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testCacheDestroy() throws Exception {
- Ignite ignite = ignite(0);
-
- for (int i = 0; i < 5; i++) {
- log.info("Iteration: " + i);
-
- IgniteCache cache = ignite.createCache(cacheConfiguration());
-
- for (int k = 0; k < 100; k++)
- cache.put(k, new TestType());
-
- GridUnsafeMemory mem = schemaMemory(ignite, cache.getName());
-
- assertTrue(mem.allocatedSize() > 0);
-
- ignite.destroyCache(cache.getName());
-
- assertEquals(0, mem.allocatedSize());
- }
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testStopNode() throws Exception {
- Ignite ignite = ignite(0);
-
- IgniteCache cache = ignite.createCache(cacheConfiguration());
-
- for (int k = 0; k < 100; k++)
- cache.put(k, new TestType());
-
- GridUnsafeMemory mem = schemaMemory(ignite, cache.getName());
-
- assertTrue(mem.allocatedSize() > 0);
-
- stopGrid(0);
-
- assertEquals(0, mem.allocatedSize());
- }
-
- /**
- * @param ignite Node.
- * @param cacheName Cache name.
- * @return Memory.
- */
- private GridUnsafeMemory schemaMemory(Ignite ignite, String cacheName) {
- Map<String, Object> schemas = GridTestUtils.getFieldValue(((IgniteKernal)ignite).context().query(),
- "idx",
- "schemas");
-
- assertNotNull(schemas);
-
- Object schema = schemas.get("\"" + cacheName + "\"");
-
- assertNotNull(schema);
-
- GridUnsafeMemory mem = GridTestUtils.getFieldValue(schema, "offheap");
-
- assertNotNull(mem);
-
- return mem;
- }
-
- /**
- * @return Cache configuration.
- */
- private CacheConfiguration cacheConfiguration() {
- CacheConfiguration ccfg = new CacheConfiguration();
-
- ccfg.setName("cache");
- ccfg.setMemoryMode(OFFHEAP_TIERED);
- ccfg.setIndexedTypes(Integer.class, TestType.class);
-
- return ccfg;
- }
-
- /**
- *
- */
- static class TestType {
- /** */
- @QuerySqlField(index = true)
- private int v1;
-
- /** */
- @QuerySqlField(index = true)
- private String v2;
-
- /** */
- @QueryTextField
- private String v3;
-
- /**
- *
- */
- public TestType() {
- int v = ThreadLocalRandom.current().nextInt();
-
- v1 = v;
- v2 = String.valueOf(v);
- v3 = v2;
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheOffheapBatchIndexingBaseTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheOffheapBatchIndexingBaseTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheOffheapBatchIndexingBaseTest.java
index 1012f34..41b6c83 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheOffheapBatchIndexingBaseTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheOffheapBatchIndexingBaseTest.java
@@ -31,7 +31,6 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
/**
@@ -87,17 +86,14 @@ public abstract class CacheOffheapBatchIndexingBaseTest extends GridCommonAbstra
}
/**
- * @param onHeapRowCacheSize on heap row cache size.
* @param indexedTypes indexed types for cache.
* @return Cache configuration.
*/
- protected CacheConfiguration<Object, Object> cacheConfiguration(int onHeapRowCacheSize, Class<?>[] indexedTypes) {
+ protected CacheConfiguration<Object, Object> cacheConfiguration(Class<?>[] indexedTypes) {
CacheConfiguration<Object, Object> ccfg = new CacheConfiguration<>();
ccfg.setAtomicityMode(ATOMIC);
ccfg.setWriteSynchronizationMode(FULL_SYNC);
- ccfg.setMemoryMode(OFFHEAP_TIERED);
- ccfg.setSqlOnheapRowCacheSize(onHeapRowCacheSize);
ccfg.setIndexedTypes(indexedTypes);
return ccfg;
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheOffheapBatchIndexingMultiTypeTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheOffheapBatchIndexingMultiTypeTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheOffheapBatchIndexingMultiTypeTest.java
index 602fc1c..87d10a1 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheOffheapBatchIndexingMultiTypeTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheOffheapBatchIndexingMultiTypeTest.java
@@ -35,18 +35,6 @@ public class CacheOffheapBatchIndexingMultiTypeTest extends CacheOffheapBatchInd
doStreamerBatchTest(50, 1_000, new Class<?>[] {
Integer.class, CacheOffheapBatchIndexingBaseTest.Person.class,
Integer.class, CacheOffheapBatchIndexingBaseTest.Organization.class},
- 1,
- true);
- }
-
- /**
- * Tests putAll with multiple indexed entities and streamer preloading with default off-heap cache size.
- */
- public void testPutAllMultupleEntitiesAndStreamerDfltOffHeapRowCacheSize() {
- doStreamerBatchTest(50, 1_000, new Class<?>[] {
- Integer.class, CacheOffheapBatchIndexingBaseTest.Person.class,
- Integer.class, CacheOffheapBatchIndexingBaseTest.Organization.class},
- CacheConfiguration.DFLT_SQL_ONHEAP_ROW_CACHE_SIZE,
true);
}
@@ -57,7 +45,6 @@ public class CacheOffheapBatchIndexingMultiTypeTest extends CacheOffheapBatchInd
doStreamerBatchTest(50,
1_000,
new Class<?>[] {Integer.class, CacheOffheapBatchIndexingBaseTest.Organization.class},
- 1,
false);
}
@@ -65,18 +52,16 @@ public class CacheOffheapBatchIndexingMultiTypeTest extends CacheOffheapBatchInd
* @param iterations Number of iterations.
* @param entitiesCnt Number of entities to put.
* @param entityClasses Entity classes.
- * @param onHeapRowCacheSize Cache size.
* @param preloadInStreamer Data preload flag.
*/
private void doStreamerBatchTest(int iterations,
int entitiesCnt,
Class<?>[] entityClasses,
- int onHeapRowCacheSize,
boolean preloadInStreamer) {
Ignite ignite = grid(0);
final IgniteCache<Object, Object> cache =
- ignite.createCache(cacheConfiguration(onHeapRowCacheSize, entityClasses));
+ ignite.createCache(cacheConfiguration(entityClasses));
try {
if (preloadInStreamer)
[02/17] ignite git commit: IGNITE-4535 - Add option to store
deserialized values on-heap
Posted by ag...@apache.org.
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOffheapAtomicPartitionedSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOffheapAtomicPartitionedSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOffheapAtomicPartitionedSelfTest.java
deleted file mode 100644
index bfdcd24..0000000
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOffheapAtomicPartitionedSelfTest.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.ignite.internal.processors.cache.ttl;
-
-import org.apache.ignite.cache.CacheMode;
-
-/**
- * TTL test with offheap.
- */
-public class CacheTtlOffheapAtomicPartitionedSelfTest extends CacheTtlOffheapAtomicAbstractSelfTest {
- /** {@inheritDoc} */
- @Override protected CacheMode cacheMode() {
- return CacheMode.PARTITIONED;
- }
-
- /** {@inheritDoc} */
- @Override protected int gridCount() {
- return 2;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOffheapTransactionalAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOffheapTransactionalAbstractSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOffheapTransactionalAbstractSelfTest.java
deleted file mode 100644
index dd09624..0000000
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOffheapTransactionalAbstractSelfTest.java
+++ /dev/null
@@ -1,29 +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.ttl;
-
-import org.apache.ignite.cache.CacheAtomicityMode;
-
-/**
- * TTL test with offheap.
- */
-public abstract class CacheTtlOffheapTransactionalAbstractSelfTest extends CacheTtlOffheapAbstractSelfTest {
- /** {@inheritDoc} */
- @Override protected CacheAtomicityMode atomicityMode() {
- return CacheAtomicityMode.TRANSACTIONAL;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOffheapTransactionalLocalSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOffheapTransactionalLocalSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOffheapTransactionalLocalSelfTest.java
deleted file mode 100644
index 5184188..0000000
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOffheapTransactionalLocalSelfTest.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.ignite.internal.processors.cache.ttl;
-
-import org.apache.ignite.cache.CacheMode;
-
-/**
- * TTL test with offheap.
- */
-public class CacheTtlOffheapTransactionalLocalSelfTest extends CacheTtlOffheapTransactionalAbstractSelfTest {
- /** {@inheritDoc} */
- @Override protected CacheMode cacheMode() {
- return CacheMode.LOCAL;
- }
-
- /** {@inheritDoc} */
- @Override protected int gridCount() {
- return 1;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOffheapTransactionalPartitionedSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOffheapTransactionalPartitionedSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOffheapTransactionalPartitionedSelfTest.java
deleted file mode 100644
index 6eb52f8..0000000
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOffheapTransactionalPartitionedSelfTest.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.ignite.internal.processors.cache.ttl;
-
-import org.apache.ignite.cache.*;
-
-/**
- * TTL test with offheap.
- */
-public class CacheTtlOffheapTransactionalPartitionedSelfTest extends CacheTtlOffheapTransactionalAbstractSelfTest {
- /** {@inheritDoc} */
- @Override protected CacheMode cacheMode() {
- return CacheMode.PARTITIONED;
- }
-
- /** {@inheritDoc} */
- @Override protected int gridCount() {
- return 2;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOnheapAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOnheapAbstractSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOnheapAbstractSelfTest.java
deleted file mode 100644
index 7bce6d9..0000000
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOnheapAbstractSelfTest.java
+++ /dev/null
@@ -1,29 +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.ttl;
-
-import org.apache.ignite.cache.*;
-
-/**
- * TTL test with offheap.
- */
-public abstract class CacheTtlOnheapAbstractSelfTest extends CacheTtlAbstractSelfTest {
- /** {@inheritDoc} */
- @Override protected CacheMemoryMode memoryMode() {
- return CacheMemoryMode.ONHEAP_TIERED;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOnheapAtomicAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOnheapAtomicAbstractSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOnheapAtomicAbstractSelfTest.java
deleted file mode 100644
index 9365b8e..0000000
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOnheapAtomicAbstractSelfTest.java
+++ /dev/null
@@ -1,29 +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.ttl;
-
-import org.apache.ignite.cache.CacheAtomicityMode;
-
-/**
- * TTL test with offheap.
- */
-public abstract class CacheTtlOnheapAtomicAbstractSelfTest extends CacheTtlOnheapAbstractSelfTest {
- /** {@inheritDoc} */
- @Override protected CacheAtomicityMode atomicityMode() {
- return CacheAtomicityMode.ATOMIC;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOnheapAtomicLocalSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOnheapAtomicLocalSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOnheapAtomicLocalSelfTest.java
deleted file mode 100644
index 7c4fe7a..0000000
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOnheapAtomicLocalSelfTest.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.ignite.internal.processors.cache.ttl;
-
-import org.apache.ignite.cache.CacheMode;
-
-/**
- * TTL test with offheap.
- */
-public class CacheTtlOnheapAtomicLocalSelfTest extends CacheTtlOnheapAtomicAbstractSelfTest {
- /** {@inheritDoc} */
- @Override protected CacheMode cacheMode() {
- return CacheMode.LOCAL;
- }
-
- /** {@inheritDoc} */
- @Override protected int gridCount() {
- return 1;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOnheapAtomicPartitionedSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOnheapAtomicPartitionedSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOnheapAtomicPartitionedSelfTest.java
deleted file mode 100644
index dc2dc95..0000000
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOnheapAtomicPartitionedSelfTest.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.ignite.internal.processors.cache.ttl;
-
-import org.apache.ignite.cache.*;
-
-/**
- * TTL test with offheap.
- */
-public class CacheTtlOnheapAtomicPartitionedSelfTest extends CacheTtlOnheapAtomicAbstractSelfTest {
- /** {@inheritDoc} */
- @Override protected CacheMode cacheMode() {
- return CacheMode.PARTITIONED;
- }
-
- /** {@inheritDoc} */
- @Override protected int gridCount() {
- return 2;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOnheapTransactionalAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOnheapTransactionalAbstractSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOnheapTransactionalAbstractSelfTest.java
deleted file mode 100644
index 2948b1b..0000000
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOnheapTransactionalAbstractSelfTest.java
+++ /dev/null
@@ -1,29 +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.ttl;
-
-import org.apache.ignite.cache.CacheAtomicityMode;
-
-/**
- * TTL test with offheap.
- */
-public abstract class CacheTtlOnheapTransactionalAbstractSelfTest extends CacheTtlOnheapAbstractSelfTest {
- /** {@inheritDoc} */
- @Override protected CacheAtomicityMode atomicityMode() {
- return CacheAtomicityMode.TRANSACTIONAL;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOnheapTransactionalLocalSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOnheapTransactionalLocalSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOnheapTransactionalLocalSelfTest.java
deleted file mode 100644
index 4283e7a..0000000
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOnheapTransactionalLocalSelfTest.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.ignite.internal.processors.cache.ttl;
-
-import org.apache.ignite.cache.CacheMode;
-
-/**
- * TTL test with offheap.
- */
-public class CacheTtlOnheapTransactionalLocalSelfTest extends CacheTtlOnheapTransactionalAbstractSelfTest {
- /** {@inheritDoc} */
- @Override protected CacheMode cacheMode() {
- return CacheMode.LOCAL;
- }
-
- /** {@inheritDoc} */
- @Override protected int gridCount() {
- return 1;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOnheapTransactionalPartitionedSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOnheapTransactionalPartitionedSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOnheapTransactionalPartitionedSelfTest.java
deleted file mode 100644
index 70fbb72..0000000
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOnheapTransactionalPartitionedSelfTest.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.ignite.internal.processors.cache.ttl;
-
-import org.apache.ignite.cache.CacheMode;
-
-/**
- * TTL test with offheap.
- */
-public class CacheTtlOnheapTransactionalPartitionedSelfTest extends CacheTtlOnheapTransactionalAbstractSelfTest {
- /** {@inheritDoc} */
- @Override protected CacheMode cacheMode() {
- return CacheMode.PARTITIONED;
- }
-
- /** {@inheritDoc} */
- @Override protected int gridCount() {
- return 2;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlTransactionalAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlTransactionalAbstractSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlTransactionalAbstractSelfTest.java
new file mode 100644
index 0000000..847ab34
--- /dev/null
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlTransactionalAbstractSelfTest.java
@@ -0,0 +1,29 @@
+/*
+ * 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.ttl;
+
+import org.apache.ignite.cache.CacheAtomicityMode;
+
+/**
+ * TTL test with offheap.
+ */
+public abstract class CacheTtlTransactionalAbstractSelfTest extends CacheTtlAbstractSelfTest {
+ /** {@inheritDoc} */
+ @Override protected CacheAtomicityMode atomicityMode() {
+ return CacheAtomicityMode.TRANSACTIONAL;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlTransactionalLocalSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlTransactionalLocalSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlTransactionalLocalSelfTest.java
new file mode 100644
index 0000000..4a8ea52
--- /dev/null
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlTransactionalLocalSelfTest.java
@@ -0,0 +1,34 @@
+/*
+ * 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.ttl;
+
+import org.apache.ignite.cache.CacheMode;
+
+/**
+ * TTL test with offheap.
+ */
+public class CacheTtlTransactionalLocalSelfTest extends CacheTtlTransactionalAbstractSelfTest {
+ /** {@inheritDoc} */
+ @Override protected CacheMode cacheMode() {
+ return CacheMode.LOCAL;
+ }
+
+ /** {@inheritDoc} */
+ @Override protected int gridCount() {
+ return 1;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlTransactionalPartitionedSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlTransactionalPartitionedSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlTransactionalPartitionedSelfTest.java
new file mode 100644
index 0000000..f31b823
--- /dev/null
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlTransactionalPartitionedSelfTest.java
@@ -0,0 +1,34 @@
+/*
+ * 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.ttl;
+
+import org.apache.ignite.cache.CacheMode;
+
+/**
+ * TTL test with offheap.
+ */
+public class CacheTtlTransactionalPartitionedSelfTest extends CacheTtlTransactionalAbstractSelfTest {
+ /** {@inheritDoc} */
+ @Override protected CacheMode cacheMode() {
+ return CacheMode.PARTITIONED;
+ }
+
+ /** {@inheritDoc} */
+ @Override protected int gridCount() {
+ return 2;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSegmentedIndexSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSegmentedIndexSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSegmentedIndexSelfTest.java
index 47cd98b..8408ad0 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSegmentedIndexSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSegmentedIndexSelfTest.java
@@ -112,8 +112,7 @@ public class IgniteSqlSegmentedIndexSelfTest extends GridCommonAbstractTest {
startGridsMultiThreaded(1, true);
final IgniteCache<Object, Object> cache = ignite(0).createCache(cacheConfig("org", true, Integer.class, Organization.class)
- .setOffHeapMaxMemory(-1)
- .setEvictionPolicy(new FifoEvictionPolicy(10)));
+ .setEvictionPolicy(new FifoEvictionPolicy(10)).setOnheapCacheEnabled(true));
for (int i = 0; i < 20; i++)
cache.put(i, new Organization("org-" + i));
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java
index 2ce4072..2d3ee0d 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java
@@ -26,7 +26,7 @@ import org.apache.ignite.internal.processors.cache.CachePartitionedQueryDetailMe
import org.apache.ignite.internal.processors.cache.CachePartitionedQueryMetricsDistributedSelfTest;
import org.apache.ignite.internal.processors.cache.CachePartitionedQueryMetricsLocalSelfTest;
import org.apache.ignite.internal.processors.cache.CacheQueryNewClientSelfTest;
-import org.apache.ignite.internal.processors.cache.CacheQueryOffheapEvictDataLostTest;
+import org.apache.ignite.internal.processors.cache.CacheQueryEvictDataLostTest;
import org.apache.ignite.internal.processors.cache.CacheReplicatedQueryDetailMetricsDistributedSelfTest;
import org.apache.ignite.internal.processors.cache.CacheReplicatedQueryDetailMetricsLocalSelfTest;
import org.apache.ignite.internal.processors.cache.CacheReplicatedQueryMetricsDistributedSelfTest;
@@ -39,8 +39,6 @@ import org.apache.ignite.internal.processors.cache.GridCacheQueryInternalKeysSel
import org.apache.ignite.internal.processors.cache.GridCacheQuerySerializationSelfTest;
import org.apache.ignite.internal.processors.cache.IgniteBinaryObjectFieldsQuerySelfTest;
import org.apache.ignite.internal.processors.cache.IgniteBinaryObjectLocalQueryArgumentsTest;
-import org.apache.ignite.internal.processors.cache.IgniteBinaryObjectQueryArgumentsOffheapLocalTest;
-import org.apache.ignite.internal.processors.cache.IgniteBinaryObjectQueryArgumentsOffheapTest;
import org.apache.ignite.internal.processors.cache.IgniteBinaryObjectQueryArgumentsTest;
import org.apache.ignite.internal.processors.cache.IgniteBinaryWrappedObjectFieldsQuerySelfTest;
import org.apache.ignite.internal.processors.cache.IgniteCacheCollocatedQuerySelfTest;
@@ -87,7 +85,6 @@ import org.apache.ignite.internal.processors.cache.local.IgniteCacheLocalFieldsQ
import org.apache.ignite.internal.processors.cache.local.IgniteCacheLocalQueryCancelOrTimeoutSelfTest;
import org.apache.ignite.internal.processors.cache.local.IgniteCacheLocalQuerySelfTest;
import org.apache.ignite.internal.processors.cache.query.GridCacheQueryTransformerSelfTest;
-import org.apache.ignite.internal.processors.cache.query.GridCacheSwapScanQuerySelfTest;
import org.apache.ignite.internal.processors.cache.query.IgniteCacheQueryCacheDestroySelfTest;
import org.apache.ignite.internal.processors.cache.query.IndexingSpiQuerySelfTest;
import org.apache.ignite.internal.processors.cache.query.IndexingSpiQueryTxSelfTest;
@@ -177,8 +174,6 @@ public class IgniteCacheQuerySelfTestSuite extends TestSuite {
suite.addTestSuite(IgniteCacheDeleteSqlQuerySelfTest.class);
suite.addTestSuite(IgniteBinaryObjectQueryArgumentsTest.class);
- suite.addTestSuite(IgniteBinaryObjectQueryArgumentsOffheapTest.class);
- suite.addTestSuite(IgniteBinaryObjectQueryArgumentsOffheapLocalTest.class);
suite.addTestSuite(IgniteBinaryObjectLocalQueryArgumentsTest.class);
suite.addTestSuite(IndexingSpiQuerySelfTest.class);
@@ -200,11 +195,9 @@ public class IgniteCacheQuerySelfTestSuite extends TestSuite {
suite.addTestSuite(GridCacheQueryIndexingDisabledSelfTest.class);
- suite.addTestSuite(GridCacheSwapScanQuerySelfTest.class);
-
suite.addTestSuite(GridOrderedMessageCancelSelfTest.class);
- suite.addTestSuite(CacheQueryOffheapEvictDataLostTest.class);
+ suite.addTestSuite(CacheQueryEvictDataLostTest.class);
// Ignite cache and H2 comparison.
suite.addTestSuite(BaseH2CompareQueryTest.class);
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite2.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite2.java b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite2.java
index 5b05aba..416f150 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite2.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite2.java
@@ -21,13 +21,9 @@ import junit.framework.TestSuite;
import org.apache.ignite.internal.processors.cache.CacheScanPartitionQueryFallbackSelfTest;
import org.apache.ignite.internal.processors.cache.IgniteCacheCrossCacheJoinRandomTest;
import org.apache.ignite.internal.processors.cache.IgniteCacheObjectKeyIndexingSelfTest;
-import org.apache.ignite.internal.processors.cache.IgniteCacheOffheapTieredMultithreadedSelfTest;
import org.apache.ignite.internal.processors.cache.IgniteCachePartitionedQueryMultiThreadedSelfTest;
import org.apache.ignite.internal.processors.cache.IgniteCacheQueryEvictsMultiThreadedSelfTest;
-import org.apache.ignite.internal.processors.cache.IgniteCacheQueryMultiThreadedOffHeapTieredSelfTest;
import org.apache.ignite.internal.processors.cache.IgniteCacheQueryMultiThreadedSelfTest;
-import org.apache.ignite.internal.processors.cache.IgniteCacheQueryOffheapEvictsMultiThreadedSelfTest;
-import org.apache.ignite.internal.processors.cache.IgniteCacheQueryOffheapMultiThreadedSelfTest;
import org.apache.ignite.internal.processors.cache.IgniteCacheSqlQueryMultiThreadedSelfTest;
import org.apache.ignite.internal.processors.cache.distributed.near.IgniteCacheClientQueryReplicatedNodeRestartSelfTest;
import org.apache.ignite.internal.processors.cache.distributed.near.IgniteCacheDistributedQueryStopOnCancelOrTimeoutSelfTest;
@@ -48,12 +44,9 @@ public class IgniteCacheQuerySelfTestSuite2 extends TestSuite {
TestSuite suite = new IgniteTestSuite("Ignite Cache Queries Test Suite 2");
suite.addTestSuite(IgniteCacheQueryMultiThreadedSelfTest.class);
- suite.addTestSuite(IgniteCacheQueryMultiThreadedOffHeapTieredSelfTest.class);
- suite.addTestSuite(IgniteCacheQueryOffheapMultiThreadedSelfTest.class);
- suite.addTestSuite(IgniteCacheOffheapTieredMultithreadedSelfTest.class);
- // TODO GG-11140.
- // suite.addTestSuite(IgniteCacheQueryEvictsMultiThreadedSelfTest.class);
- // suite.addTestSuite(IgniteCacheQueryOffheapEvictsMultiThreadedSelfTest.class);
+
+ suite.addTestSuite(IgniteCacheQueryEvictsMultiThreadedSelfTest.class);
+
suite.addTestSuite(IgniteCacheCrossCacheJoinRandomTest.class);
suite.addTestSuite(IgniteCacheClientQueryReplicatedNodeRestartSelfTest.class);
suite.addTestSuite(IgniteCacheQueryNodeFailTest.class);
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite3.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite3.java b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite3.java
index e4ca29f..8dd273a 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite3.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite3.java
@@ -37,8 +37,6 @@ import org.apache.ignite.internal.processors.cache.query.continuous.ClientReconn
import org.apache.ignite.internal.processors.cache.query.continuous.ContinuousQueryPeerClassLoadingTest;
import org.apache.ignite.internal.processors.cache.query.continuous.ContinuousQueryRemoteFilterMissingInClassPathSelfTest;
import org.apache.ignite.internal.processors.cache.query.continuous.GridCacheContinuousQueryAtomicNearEnabledSelfTest;
-import org.apache.ignite.internal.processors.cache.query.continuous.GridCacheContinuousQueryAtomicOffheapTieredTest;
-import org.apache.ignite.internal.processors.cache.query.continuous.GridCacheContinuousQueryAtomicOffheapValuesTest;
import org.apache.ignite.internal.processors.cache.query.continuous.GridCacheContinuousQueryAtomicP2PDisabledSelfTest;
import org.apache.ignite.internal.processors.cache.query.continuous.GridCacheContinuousQueryAtomicSelfTest;
import org.apache.ignite.internal.processors.cache.query.continuous.GridCacheContinuousQueryConcurrentTest;
@@ -56,8 +54,6 @@ import org.apache.ignite.internal.processors.cache.query.continuous.GridCacheCon
import org.apache.ignite.internal.processors.cache.query.continuous.GridCacheContinuousQueryReplicatedP2PDisabledSelfTest;
import org.apache.ignite.internal.processors.cache.query.continuous.GridCacheContinuousQueryReplicatedSelfTest;
import org.apache.ignite.internal.processors.cache.query.continuous.GridCacheContinuousQueryReplicatedTxOneNodeTest;
-import org.apache.ignite.internal.processors.cache.query.continuous.GridCacheContinuousQueryTxOffheapTieredTest;
-import org.apache.ignite.internal.processors.cache.query.continuous.GridCacheContinuousQueryTxOffheapValuesTest;
import org.apache.ignite.internal.processors.cache.query.continuous.GridCacheContinuousQueryTxSelfTest;
import org.apache.ignite.internal.processors.cache.query.continuous.IgniteCacheContinuousQueryBackupQueueTest;
import org.apache.ignite.internal.processors.cache.query.continuous.IgniteCacheContinuousQueryClientReconnectTest;
@@ -87,13 +83,9 @@ public class IgniteCacheQuerySelfTestSuite3 extends TestSuite {
suite.addTestSuite(GridCacheContinuousQueryPartitionedOnlySelfTest.class);
suite.addTestSuite(GridCacheContinuousQueryPartitionedP2PDisabledSelfTest.class);
suite.addTestSuite(GridCacheContinuousQueryTxSelfTest.class);
- suite.addTestSuite(GridCacheContinuousQueryTxOffheapTieredTest.class);
- suite.addTestSuite(GridCacheContinuousQueryTxOffheapValuesTest.class);
suite.addTestSuite(GridCacheContinuousQueryAtomicSelfTest.class);
suite.addTestSuite(GridCacheContinuousQueryAtomicNearEnabledSelfTest.class);
suite.addTestSuite(GridCacheContinuousQueryAtomicP2PDisabledSelfTest.class);
- suite.addTestSuite(GridCacheContinuousQueryAtomicOffheapTieredTest.class);
- suite.addTestSuite(GridCacheContinuousQueryAtomicOffheapValuesTest.class);
suite.addTestSuite(GridCacheContinuousQueryReplicatedTxOneNodeTest.class);
suite.addTestSuite(GridCacheContinuousQueryReplicatedAtomicOneNodeTest.class);
suite.addTestSuite(GridCacheContinuousQueryPartitionTxOneNodeTest.class);
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite4.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite4.java b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite4.java
index c4fcdac..052174e 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite4.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite4.java
@@ -21,10 +21,8 @@ import junit.framework.TestSuite;
import org.apache.ignite.internal.processors.cache.query.continuous.CacheContinuousQueryAsyncFailoverAtomicPrimaryWriteOrderSelfTest;
import org.apache.ignite.internal.processors.cache.query.continuous.CacheContinuousQueryAsyncFailoverTxReplicatedSelfTest;
import org.apache.ignite.internal.processors.cache.query.continuous.CacheContinuousQueryAsyncFailoverTxSelfTest;
-import org.apache.ignite.internal.processors.cache.query.continuous.CacheContinuousQueryFailoverAtomicPrimaryWriteOrderOffheapTieredTest;
import org.apache.ignite.internal.processors.cache.query.continuous.CacheContinuousQueryFailoverAtomicPrimaryWriteOrderSelfTest;
import org.apache.ignite.internal.processors.cache.query.continuous.CacheContinuousQueryFailoverAtomicReplicatedSelfTest;
-import org.apache.ignite.internal.processors.cache.query.continuous.CacheContinuousQueryFailoverTxOffheapTieredTest;
import org.apache.ignite.internal.processors.cache.query.continuous.CacheContinuousQueryFailoverTxReplicatedSelfTest;
import org.apache.ignite.internal.processors.cache.query.continuous.CacheContinuousQueryFailoverTxSelfTest;
@@ -44,8 +42,6 @@ public class IgniteCacheQuerySelfTestSuite4 extends TestSuite {
suite.addTestSuite(CacheContinuousQueryFailoverAtomicReplicatedSelfTest.class);
suite.addTestSuite(CacheContinuousQueryFailoverTxSelfTest.class);
suite.addTestSuite(CacheContinuousQueryFailoverTxReplicatedSelfTest.class);
- suite.addTestSuite(CacheContinuousQueryFailoverAtomicPrimaryWriteOrderOffheapTieredTest.class);
- suite.addTestSuite(CacheContinuousQueryFailoverTxOffheapTieredTest.class);
suite.addTestSuite(CacheContinuousQueryAsyncFailoverAtomicPrimaryWriteOrderSelfTest.class);
suite.addTestSuite(CacheContinuousQueryAsyncFailoverTxReplicatedSelfTest.class);
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheWithIndexingTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheWithIndexingTestSuite.java b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheWithIndexingTestSuite.java
index 025db65..0f4a418 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheWithIndexingTestSuite.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheWithIndexingTestSuite.java
@@ -21,7 +21,6 @@ import junit.framework.TestSuite;
import org.apache.ignite.internal.processors.cache.CacheBinaryKeyConcurrentQueryTest;
import org.apache.ignite.internal.processors.cache.CacheConfigurationP2PTest;
import org.apache.ignite.internal.processors.cache.CacheIndexStreamerTest;
-import org.apache.ignite.internal.processors.cache.CacheIndexingOffheapCleanupTest;
import org.apache.ignite.internal.processors.cache.CacheOperationsWithExpirationTest;
import org.apache.ignite.internal.processors.cache.CacheQueryFilterExpiredTest;
import org.apache.ignite.internal.processors.cache.CacheRandomOperationsMultithreadedTest;
@@ -33,14 +32,10 @@ import org.apache.ignite.internal.processors.cache.GridIndexingWithNoopSwapSelfT
import org.apache.ignite.internal.processors.cache.IgniteCacheConfigurationPrimitiveTypesSelfTest;
import org.apache.ignite.internal.processors.cache.IgniteCacheStarvationOnRebalanceTest;
import org.apache.ignite.internal.processors.cache.IgniteClientReconnectQueriesTest;
-import org.apache.ignite.internal.processors.cache.ttl.CacheTtlOffheapAtomicLocalSelfTest;
-import org.apache.ignite.internal.processors.cache.ttl.CacheTtlOffheapAtomicPartitionedSelfTest;
-import org.apache.ignite.internal.processors.cache.ttl.CacheTtlOffheapTransactionalLocalSelfTest;
-import org.apache.ignite.internal.processors.cache.ttl.CacheTtlOffheapTransactionalPartitionedSelfTest;
-import org.apache.ignite.internal.processors.cache.ttl.CacheTtlOnheapAtomicLocalSelfTest;
-import org.apache.ignite.internal.processors.cache.ttl.CacheTtlOnheapAtomicPartitionedSelfTest;
-import org.apache.ignite.internal.processors.cache.ttl.CacheTtlOnheapTransactionalLocalSelfTest;
-import org.apache.ignite.internal.processors.cache.ttl.CacheTtlOnheapTransactionalPartitionedSelfTest;
+import org.apache.ignite.internal.processors.cache.ttl.CacheTtlAtomicLocalSelfTest;
+import org.apache.ignite.internal.processors.cache.ttl.CacheTtlAtomicPartitionedSelfTest;
+import org.apache.ignite.internal.processors.cache.ttl.CacheTtlTransactionalLocalSelfTest;
+import org.apache.ignite.internal.processors.cache.ttl.CacheTtlTransactionalPartitionedSelfTest;
/**
* Cache tests using indexing.
@@ -56,14 +51,10 @@ public class IgniteCacheWithIndexingTestSuite extends TestSuite {
suite.addTestSuite(GridIndexingWithNoopSwapSelfTest.class);
suite.addTestSuite(GridCacheOffHeapSelfTest.class);
- suite.addTestSuite(CacheTtlOffheapAtomicLocalSelfTest.class);
- suite.addTestSuite(CacheTtlOffheapAtomicPartitionedSelfTest.class);
- suite.addTestSuite(CacheTtlOffheapTransactionalLocalSelfTest.class);
- suite.addTestSuite(CacheTtlOffheapTransactionalPartitionedSelfTest.class);
- suite.addTestSuite(CacheTtlOnheapTransactionalLocalSelfTest.class);
- suite.addTestSuite(CacheTtlOnheapTransactionalPartitionedSelfTest.class);
- suite.addTestSuite(CacheTtlOnheapAtomicLocalSelfTest.class);
- suite.addTestSuite(CacheTtlOnheapAtomicPartitionedSelfTest.class);
+ suite.addTestSuite(CacheTtlTransactionalLocalSelfTest.class);
+ suite.addTestSuite(CacheTtlTransactionalPartitionedSelfTest.class);
+ suite.addTestSuite(CacheTtlAtomicLocalSelfTest.class);
+ suite.addTestSuite(CacheTtlAtomicPartitionedSelfTest.class);
suite.addTestSuite(GridCacheOffheapIndexGetSelfTest.class);
suite.addTestSuite(GridCacheOffheapIndexEntryEvictTest.class);
@@ -77,7 +68,6 @@ public class IgniteCacheWithIndexingTestSuite extends TestSuite {
suite.addTestSuite(IgniteCacheStarvationOnRebalanceTest.class);
suite.addTestSuite(CacheOperationsWithExpirationTest.class);
suite.addTestSuite(CacheBinaryKeyConcurrentQueryTest.class);
- suite.addTestSuite(CacheIndexingOffheapCleanupTest.class);
suite.addTestSuite(CacheQueryFilterExpiredTest.class);
suite.addTestSuite(ClientReconnectAfterClusterRestartTest.class);
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheConfigurationTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheConfigurationTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheConfigurationTest.cs
index 9ef1005..250177d 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheConfigurationTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheConfigurationTest.cs
@@ -29,7 +29,6 @@ namespace Apache.Ignite.Core.Tests.Cache
using Apache.Ignite.Core.Cache.Expiry;
using Apache.Ignite.Core.Cache.Store;
using Apache.Ignite.Core.Common;
- using Apache.Ignite.Core.Impl.Cache.Affinity;
using Apache.Ignite.Core.Tests.Plugin.Cache;
using NUnit.Framework;
@@ -198,13 +197,11 @@ namespace Apache.Ignite.Core.Tests.Cache
Assert.AreEqual(CacheConfiguration.DefaultLongQueryWarningTimeout, cfg.LongQueryWarningTimeout);
Assert.AreEqual(CacheConfiguration.DefaultMaxConcurrentAsyncOperations, cfg.MaxConcurrentAsyncOperations);
Assert.AreEqual(CacheConfiguration.DefaultMaxEvictionOverflowRatio, cfg.MaxEvictionOverflowRatio);
- Assert.AreEqual(CacheConfiguration.DefaultOffHeapMaxMemory, cfg.OffHeapMaxMemory);
Assert.AreEqual(CacheConfiguration.DefaultReadFromBackup, cfg.ReadFromBackup);
Assert.AreEqual(CacheConfiguration.DefaultRebalanceBatchSize, cfg.RebalanceBatchSize);
Assert.AreEqual(CacheConfiguration.DefaultRebalanceMode, cfg.RebalanceMode);
Assert.AreEqual(CacheConfiguration.DefaultRebalanceThrottle, cfg.RebalanceThrottle);
Assert.AreEqual(CacheConfiguration.DefaultRebalanceTimeout, cfg.RebalanceTimeout);
- Assert.AreEqual(CacheConfiguration.DefaultSqlOnheapRowCacheSize, cfg.SqlOnheapRowCacheSize);
Assert.AreEqual(CacheConfiguration.DefaultStartSize, cfg.StartSize);
Assert.AreEqual(CacheConfiguration.DefaultStartSize, cfg.StartSize);
Assert.AreEqual(CacheConfiguration.DefaultWriteBehindBatchSize, cfg.WriteBehindBatchSize);
@@ -235,13 +232,11 @@ namespace Apache.Ignite.Core.Tests.Cache
Assert.AreEqual(x.LongQueryWarningTimeout, y.LongQueryWarningTimeout);
Assert.AreEqual(x.MaxConcurrentAsyncOperations, y.MaxConcurrentAsyncOperations);
Assert.AreEqual(x.MaxEvictionOverflowRatio, y.MaxEvictionOverflowRatio);
- Assert.AreEqual(x.OffHeapMaxMemory, y.OffHeapMaxMemory);
Assert.AreEqual(x.ReadFromBackup, y.ReadFromBackup);
Assert.AreEqual(x.RebalanceBatchSize, y.RebalanceBatchSize);
Assert.AreEqual(x.RebalanceMode, y.RebalanceMode);
Assert.AreEqual(x.RebalanceThrottle, y.RebalanceThrottle);
Assert.AreEqual(x.RebalanceTimeout, y.RebalanceTimeout);
- Assert.AreEqual(x.SqlOnheapRowCacheSize, y.SqlOnheapRowCacheSize);
Assert.AreEqual(x.StartSize, y.StartSize);
Assert.AreEqual(x.StartSize, y.StartSize);
Assert.AreEqual(x.WriteBehindBatchSize, y.WriteBehindBatchSize);
@@ -487,7 +482,6 @@ namespace Apache.Ignite.Core.Tests.Cache
return new CacheConfiguration
{
Name = name ?? CacheName,
- OffHeapMaxMemory = 1,
StartSize = 2,
MaxConcurrentAsyncOperations = 3,
WriteBehindFlushThreadCount = 4,
@@ -516,7 +510,6 @@ namespace Apache.Ignite.Core.Tests.Cache
RebalanceThrottle = TimeSpan.FromSeconds(15),
RebalanceTimeout = TimeSpan.FromSeconds(16),
SqlEscapeAll = true,
- SqlOnheapRowCacheSize = 17,
WriteBehindBatchSize = 18,
WriteBehindEnabled = false,
WriteSynchronizationMode = CacheWriteSynchronizationMode.PrimarySync,
@@ -581,7 +574,6 @@ namespace Apache.Ignite.Core.Tests.Cache
return new CacheConfiguration
{
Name = name ?? CacheName2,
- OffHeapMaxMemory = 1,
StartSize = 2,
MaxConcurrentAsyncOperations = 3,
WriteBehindFlushThreadCount = 4,
@@ -610,7 +602,6 @@ namespace Apache.Ignite.Core.Tests.Cache
RebalanceThrottle = TimeSpan.FromSeconds(15),
RebalanceTimeout = TimeSpan.FromSeconds(16),
SqlEscapeAll = true,
- SqlOnheapRowCacheSize = 17,
WriteBehindBatchSize = 18,
WriteBehindEnabled = false,
WriteSynchronizationMode = CacheWriteSynchronizationMode.PrimarySync,
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationSerializerTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationSerializerTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationSerializerTest.cs
index 532f6d5..58fda7c 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationSerializerTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationSerializerTest.cs
@@ -621,7 +621,6 @@ namespace Apache.Ignite.Core.Tests
LongQueryWarningTimeout = TimeSpan.FromSeconds(99),
MaxConcurrentAsyncOperations = 24,
MaxEvictionOverflowRatio = 5.6F,
- OffHeapMaxMemory = 567,
QueryEntities = new[]
{
new QueryEntity
@@ -650,7 +649,6 @@ namespace Apache.Ignite.Core.Tests
RebalanceThrottle = TimeSpan.FromHours(44),
RebalanceTimeout = TimeSpan.FromMinutes(8),
SqlEscapeAll = true,
- SqlOnheapRowCacheSize = 679,
StartSize = 1023,
WriteBehindBatchSize = 45,
WriteBehindEnabled = true,
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Configuration/CacheConfiguration.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Configuration/CacheConfiguration.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Configuration/CacheConfiguration.cs
index 9ae3f6c..a5b9712 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Configuration/CacheConfiguration.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Configuration/CacheConfiguration.cs
@@ -182,13 +182,11 @@ namespace Apache.Ignite.Core.Cache.Configuration
LongQueryWarningTimeout = DefaultLongQueryWarningTimeout;
MaxConcurrentAsyncOperations = DefaultMaxConcurrentAsyncOperations;
MaxEvictionOverflowRatio = DefaultMaxEvictionOverflowRatio;
- OffHeapMaxMemory = DefaultOffHeapMaxMemory;
ReadFromBackup = DefaultReadFromBackup;
RebalanceBatchSize = DefaultRebalanceBatchSize;
RebalanceMode = DefaultRebalanceMode;
RebalanceThrottle = DefaultRebalanceThrottle;
RebalanceTimeout = DefaultRebalanceTimeout;
- SqlOnheapRowCacheSize = DefaultSqlOnheapRowCacheSize;
StartSize = DefaultStartSize;
WriteBehindBatchSize = DefaultWriteBehindBatchSize;
WriteBehindEnabled = DefaultWriteBehindEnabled;
@@ -248,7 +246,6 @@ namespace Apache.Ignite.Core.Cache.Configuration
MaxConcurrentAsyncOperations = reader.ReadInt();
MaxEvictionOverflowRatio = reader.ReadFloat();
Name = reader.ReadString();
- OffHeapMaxMemory = reader.ReadLong();
ReadFromBackup = reader.ReadBoolean();
RebalanceBatchSize = reader.ReadInt();
RebalanceDelay = reader.ReadLongAsTimespan();
@@ -256,7 +253,6 @@ namespace Apache.Ignite.Core.Cache.Configuration
RebalanceThrottle = reader.ReadLongAsTimespan();
RebalanceTimeout = reader.ReadLongAsTimespan();
SqlEscapeAll = reader.ReadBoolean();
- SqlOnheapRowCacheSize = reader.ReadInt();
StartSize = reader.ReadInt();
WriteBehindBatchSize = reader.ReadInt();
WriteBehindEnabled = reader.ReadBoolean();
@@ -311,7 +307,6 @@ namespace Apache.Ignite.Core.Cache.Configuration
writer.WriteInt(MaxConcurrentAsyncOperations);
writer.WriteFloat(MaxEvictionOverflowRatio);
writer.WriteString(Name);
- writer.WriteLong(OffHeapMaxMemory);
writer.WriteBoolean(ReadFromBackup);
writer.WriteInt(RebalanceBatchSize);
writer.WriteLong((long) RebalanceDelay.TotalMilliseconds);
@@ -319,7 +314,6 @@ namespace Apache.Ignite.Core.Cache.Configuration
writer.WriteLong((long) RebalanceThrottle.TotalMilliseconds);
writer.WriteLong((long) RebalanceTimeout.TotalMilliseconds);
writer.WriteBoolean(SqlEscapeAll);
- writer.WriteInt(SqlOnheapRowCacheSize);
writer.WriteInt(StartSize);
writer.WriteInt(WriteBehindBatchSize);
writer.WriteBoolean(WriteBehindEnabled);
@@ -621,16 +615,6 @@ namespace Apache.Ignite.Core.Cache.Configuration
public TimeSpan RebalanceThrottle { get; set; }
/// <summary>
- /// Gets or sets maximum amount of memory available to off-heap storage. Possible values are
- /// -1 means that off-heap storage is disabled. 0 means that Ignite will not limit off-heap storage
- /// (it's up to user to properly add and remove entries from cache to ensure that off-heap storage
- /// does not grow indefinitely.
- /// Any positive value specifies the limit of off-heap storage in bytes.
- /// </summary>
- [DefaultValue(DefaultOffHeapMaxMemory)]
- public long OffHeapMaxMemory { get; set; }
-
- /// <summary>
/// Gets or sets flag indicating whether data can be read from backup.
/// </summary>
[DefaultValue(DefaultReadFromBackup)]
@@ -657,13 +641,6 @@ namespace Apache.Ignite.Core.Cache.Configuration
public bool SqlEscapeAll { get; set; }
/// <summary>
- /// Number of SQL rows which will be cached onheap to avoid deserialization on each SQL index access.
- /// This setting only makes sense when offheap is enabled for this cache.
- /// </summary>
- [DefaultValue(DefaultSqlOnheapRowCacheSize)]
- public int SqlOnheapRowCacheSize { get; set; }
-
- /// <summary>
/// Gets or sets the factory for underlying persistent storage for read-through and write-through operations.
/// <para />
/// See <see cref="ReadThrough"/> and <see cref="WriteThrough"/> properties to enable read-through and
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/cache/VisorCacheCommand.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/cache/VisorCacheCommand.scala b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/cache/VisorCacheCommand.scala
index ce77ffe..6d49a3b 100755
--- a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/cache/VisorCacheCommand.scala
+++ b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/cache/VisorCacheCommand.scala
@@ -869,11 +869,6 @@ object VisorCacheCommand {
cacheT += ("Eviction Policy", safe(evictCfg.policy()))
cacheT += ("Eviction Policy Max Size", safe(evictCfg.policyMaxSize()))
cacheT += ("Eviction Filter", safe(evictCfg.filter()))
- cacheT += ("Eviction Key Buffer Size", evictCfg.synchronizedKeyBufferSize())
- cacheT += ("Eviction Synchronized", bool2Str(evictCfg.evictSynchronized()))
- cacheT += ("Eviction Overflow Ratio", evictCfg.maxOverflowRatio())
- cacheT += ("Synchronous Eviction Timeout", evictCfg.synchronizedTimeout())
- cacheT += ("Synchronous Eviction Concurrency Level", evictCfg.synchronizedConcurrencyLevel())
cacheT += ("Near Cache Enabled", bool2Str(nearCfg.nearEnabled()))
cacheT += ("Near Start Size", nearCfg.nearStartSize())
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/yardstick/README.txt
----------------------------------------------------------------------
diff --git a/modules/yardstick/README.txt b/modules/yardstick/README.txt
index 5903fd4..c21ed2a 100644
--- a/modules/yardstick/README.txt
+++ b/modules/yardstick/README.txt
@@ -120,8 +120,6 @@ would behave like a `servers`.
* `-nn <num>` or `--nodeNumber <num>` - Number of nodes (automatically set in `benchmark.properties`), used to wait for
the specified number of nodes to start
* `-sm <mode>` or `-syncMode <mode>` - Synchronization mode (defined in `CacheWriteSynchronizationMode`)
-* `-ot` or `--offheapTiered` - Flag indicating whether tiered off-heap mode is on
-* `-ov` or `--offheapValuesOnly` - Flag indicating whether off-heap mode is on and only cache values are stored off-heap
* `-r <num>` or `--range` - Range of keys that are randomly generated for cache operations
* `-rd or --restartdelay` - Restart delay in seconds
* `-rs or --restartsleep` - Restart sleep in seconds
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/yardstick/config/benchmark-atomic-win.properties
----------------------------------------------------------------------
diff --git a/modules/yardstick/config/benchmark-atomic-win.properties b/modules/yardstick/config/benchmark-atomic-win.properties
index 202306e..be13d77 100644
--- a/modules/yardstick/config/benchmark-atomic-win.properties
+++ b/modules/yardstick/config/benchmark-atomic-win.properties
@@ -54,11 +54,5 @@ set DRIVER_HOSTS=localhost
:: Note that each benchmark is set to run for 300 seconds (5 min) with warm-up set to 60 seconds (1 minute).
set CONFIGS=^
-cfg %SCRIPT_DIR%\..\config\ignite-localhost-config.xml -b 1 -w 60 -d 300 -t 64 -sm PRIMARY_SYNC -dn IgniteGetBenchmark -sn IgniteNode -ds atomic-get-1-backup,^
--cfg %SCRIPT_DIR%\..\config\ignite-localhost-config.xml -b 1 -w 60 -d 300 -t 64 -sm PRIMARY_SYNC -dn IgniteGetOffHeapBenchmark -sn IgniteNode -ds atomic-get-offheap-1-backup,^
--cfg %SCRIPT_DIR%\..\config\ignite-localhost-config.xml -b 1 -w 60 -d 300 -t 64 -sm PRIMARY_SYNC -dn IgniteGetOffHeapValuesBenchmark -sn IgniteNode -ds atomic-get-offheap-val-1-backup,^
-cfg %SCRIPT_DIR%\..\config\ignite-localhost-config.xml -b 1 -w 60 -d 300 -t 64 -sm PRIMARY_SYNC -dn IgnitePutGetBenchmark -sn IgniteNode -ds atomic-put-get-1-backup,^
--cfg %SCRIPT_DIR%\..\config\ignite-localhost-config.xml -b 1 -w 60 -d 300 -t 64 -sm PRIMARY_SYNC -dn IgnitePutGetOffHeapBenchmark -sn IgniteNode -ds atomic-put-get-offheap-1-backup,^
--cfg %SCRIPT_DIR%\..\config\ignite-localhost-config.xml -b 1 -w 60 -d 300 -t 64 -sm PRIMARY_SYNC -dn IgnitePutGetOffHeapValuesBenchmark -sn IgniteNode -ds atomic-put-get-offheap-val-1-backup,^
--cfg %SCRIPT_DIR%\..\config\ignite-localhost-config.xml -b 1 -w 60 -d 300 -t 64 -sm PRIMARY_SYNC -dn IgnitePutBenchmark -sn IgniteNode -ds atomic-put-1-backup,^
--cfg %SCRIPT_DIR%\..\config\ignite-localhost-config.xml -b 1 -w 60 -d 300 -t 64 -sm PRIMARY_SYNC -dn IgnitePutOffHeapBenchmark -sn IgniteNode -ds atomic-put-offheap-1-backup,^
--cfg %SCRIPT_DIR%\..\config\ignite-localhost-config.xml -b 1 -w 60 -d 300 -t 64 -sm PRIMARY_SYNC -dn IgnitePutOffHeapValuesBenchmark -sn IgniteNode -ds atomic-put-offheap-val-1-backup
+-cfg %SCRIPT_DIR%\..\config\ignite-localhost-config.xml -b 1 -w 60 -d 300 -t 64 -sm PRIMARY_SYNC -dn IgnitePutBenchmark -sn IgniteNode -ds atomic-put-1-backup
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/yardstick/config/benchmark-atomic.properties
----------------------------------------------------------------------
diff --git a/modules/yardstick/config/benchmark-atomic.properties b/modules/yardstick/config/benchmark-atomic.properties
index f296041..8e2413b 100644
--- a/modules/yardstick/config/benchmark-atomic.properties
+++ b/modules/yardstick/config/benchmark-atomic.properties
@@ -75,12 +75,6 @@ sm=PRIMARY_SYNC
# Note that each benchmark is set to run for 300 seconds (5 min) with warm-up set to 60 seconds (1 minute).
CONFIGS="\
-cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteGetBenchmark -sn IgniteNode -ds ${ver}atomic-get-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteGetOffHeapBenchmark -sn IgniteNode -ds ${ver}atomic-get-offheap-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteGetOffHeapValuesBenchmark -sn IgniteNode -ds ${ver}atomic-get-offheap-val-${b}-backup,\
-cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgnitePutGetBenchmark -sn IgniteNode -ds ${ver}atomic-put-get-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgnitePutGetOffHeapBenchmark -sn IgniteNode -ds ${ver}atomic-put-get-offheap-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgnitePutGetOffHeapValuesBenchmark -sn IgniteNode -ds ${ver}atomic-put-get-offheap-val-${b}-backup,\
-cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgnitePutBenchmark -sn IgniteNode -ds ${ver}atomic-put-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgnitePutOffHeapBenchmark -sn IgniteNode -ds ${ver}atomic-put-offheap-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgnitePutOffHeapValuesBenchmark -sn IgniteNode -ds ${ver}atomic-put-offheap-val-${b}-backup\
"
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/yardstick/config/benchmark-client-mode.properties
----------------------------------------------------------------------
diff --git a/modules/yardstick/config/benchmark-client-mode.properties b/modules/yardstick/config/benchmark-client-mode.properties
index ad501f1..923c96a 100644
--- a/modules/yardstick/config/benchmark-client-mode.properties
+++ b/modules/yardstick/config/benchmark-client-mode.properties
@@ -95,13 +95,4 @@ CONFIGS="\
-cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} --client -sm PRIMARY_SYNC -j ${j} -dn IgniteBroadcastBenchmark -sn IgniteNode -ds ${ver}broad-compute-${b}-backup,\
-cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} --client -sm PRIMARY_SYNC -j ${j} -dn IgniteExecuteBenchmark -sn IgniteNode -ds ${ver}exec-compute-${b}-backup,\
-cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} --client -sm PRIMARY_SYNC -j ${j} -dn IgniteRunBenchmark -sn IgniteNode -ds ${ver}run-compute-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} --client -sm PRIMARY_SYNC -dn IgnitePutGetOffHeapBenchmark -sn IgniteNode -ds ${ver}atomic-put-get-offheap-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} --client -sm PRIMARY_SYNC -dn IgnitePutGetOffHeapValuesBenchmark -sn IgniteNode -ds ${ver}atomic-put-get-offheap-val-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} --client -sm PRIMARY_SYNC -dn IgnitePutOffHeapBenchmark -sn IgniteNode -ds ${ver}atomic-put-offheap-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} --client -sm PRIMARY_SYNC -dn IgnitePutOffHeapValuesBenchmark -sn IgniteNode -ds ${ver}atomic-put-offheap-val-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} --client -sm PRIMARY_SYNC -dn IgnitePutTxOffHeapBenchmark -sn IgniteNode -ds ${ver}tx-put-offheap-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} --client -sm PRIMARY_SYNC -dn IgnitePutTxOffHeapValuesBenchmark -sn IgniteNode -ds ${ver}tx-put-offheap-val-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} --client -sm PRIMARY_SYNC -dn IgniteSqlQueryOffHeapBenchmark -sn IgniteNode -ds ${ver}sql-query-offheap-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} --client -sm PRIMARY_SYNC -dn IgniteSqlQueryJoinOffHeapBenchmark -sn IgniteNode -ds ${ver}sql-query-join-offheap-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} --client -sm PRIMARY_SYNC -dn IgniteSqlQueryPutOffHeapBenchmark -sn IgniteNode -ds ${ver}sql-query-put-offheap-${b}-backup\
"
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/yardstick/config/benchmark-multicast.properties
----------------------------------------------------------------------
diff --git a/modules/yardstick/config/benchmark-multicast.properties b/modules/yardstick/config/benchmark-multicast.properties
index 2b4d99b..5071a11 100644
--- a/modules/yardstick/config/benchmark-multicast.properties
+++ b/modules/yardstick/config/benchmark-multicast.properties
@@ -100,15 +100,6 @@ CONFIGS="\
-cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -j ${j} -dn IgniteBroadcastBenchmark -sn IgniteNode -ds ${ver}broad-compute-${b}-backup,\
-cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -j ${j} -dn IgniteExecuteBenchmark -sn IgniteNode -ds ${ver}exec-compute-${b}-backup,\
-cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -j ${j} -dn IgniteRunBenchmark -sn IgniteNode -ds ${ver}run-compute-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgnitePutGetOffHeapBenchmark -sn IgniteNode -ds ${ver}atomic-put-get-offheap-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgnitePutGetOffHeapValuesBenchmark -sn IgniteNode -ds ${ver}atomic-put-get-offheap-val-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgnitePutOffHeapBenchmark -sn IgniteNode -ds ${ver}atomic-put-offheap-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgnitePutOffHeapValuesBenchmark -sn IgniteNode -ds ${ver}atomic-put-offheap-val-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgnitePutTxOffHeapBenchmark -sn IgniteNode -ds ${ver}tx-optimistic-put-offheap-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgnitePutTxOffHeapValuesBenchmark -sn IgniteNode -ds ${ver}tx-optimistic-put-offheap-val-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteSqlQueryOffHeapBenchmark -sn IgniteNode -ds ${ver}sql-query-offheap-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteSqlQueryJoinOffHeapBenchmark -sn IgniteNode -ds ${ver}sql-query-join-offheap-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteSqlQueryPutOffHeapBenchmark -sn IgniteNode -ds ${ver}sql-query-put-offheap-${b}-backup,\
-cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -bs 100 -dn IgnitePutAllBenchmark -sn IgniteNode -ds ${ver}atomic-putAll-${b}-backup,\
-cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -bs 100 -dn IgnitePutAllTxBenchmark -sn IgniteNode -ds ${ver}tx-putAll-${b}-backup,\
-cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -bs 100 -dn IgnitePutAllSerializableTxBenchmark -sn IgniteNode -ds ${ver}tx-putAllSerializable-${b}-backup,\
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/yardstick/config/benchmark-query-win.properties
----------------------------------------------------------------------
diff --git a/modules/yardstick/config/benchmark-query-win.properties b/modules/yardstick/config/benchmark-query-win.properties
index 6bd8fb9..0c410e3 100644
--- a/modules/yardstick/config/benchmark-query-win.properties
+++ b/modules/yardstick/config/benchmark-query-win.properties
@@ -54,8 +54,5 @@ set DRIVER_HOSTS=localhost
:: Note that each benchmark is set to run for 300 seconds (5 min) with warm-up set to 60 seconds (1 minute).
set CONFIGS=^
-cfg %SCRIPT_DIR%\..\config\ignite-localhost-config.xml -b 1 -w 60 -d 300 -t 64 -sm PRIMARY_SYNC -dn IgniteSqlQueryBenchmark -sn IgniteNode -ds sql-query-1-backup,^
--cfg %SCRIPT_DIR%\..\config\ignite-localhost-config.xml -b 1 -w 60 -d 300 -t 64 -sm PRIMARY_SYNC -dn IgniteSqlQueryOffHeapBenchmark -sn IgniteNode -ds sql-query-offheap-1-backup,^
-cfg %SCRIPT_DIR%\..\config\ignite-localhost-config.xml -b 1 -w 60 -d 300 -t 64 -sm PRIMARY_SYNC -dn IgniteSqlQueryJoinBenchmark -sn IgniteNode -ds sql-query-join-1-backup,^
--cfg %SCRIPT_DIR%\..\config\ignite-localhost-config.xml -b 1 -w 60 -d 300 -t 64 -sm PRIMARY_SYNC -dn IgniteSqlQueryJoinOffHeapBenchmark -sn IgniteNode -ds sql-query-join-offheap-1-backup,^
--cfg %SCRIPT_DIR%\..\config\ignite-localhost-config.xml -b 1 -w 60 -d 300 -t 64 -sm PRIMARY_SYNC -dn IgniteSqlQueryPutBenchmark -sn IgniteNode -ds sql-query-put-1-backup,^
--cfg %SCRIPT_DIR%\..\config\ignite-localhost-config.xml -b 1 -w 60 -d 300 -t 64 -sm PRIMARY_SYNC -dn IgniteSqlQueryPutOffHeapBenchmark -sn IgniteNode -ds sql-query-put-offheap-1-backup
+-cfg %SCRIPT_DIR%\..\config\ignite-localhost-config.xml -b 1 -w 60 -d 300 -t 64 -sm PRIMARY_SYNC -dn IgniteSqlQueryPutBenchmark -sn IgniteNode -ds sql-query-put-1-backup
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/yardstick/config/benchmark-query.properties
----------------------------------------------------------------------
diff --git a/modules/yardstick/config/benchmark-query.properties b/modules/yardstick/config/benchmark-query.properties
index c364cfd..2612ec9 100644
--- a/modules/yardstick/config/benchmark-query.properties
+++ b/modules/yardstick/config/benchmark-query.properties
@@ -75,11 +75,8 @@ sm=PRIMARY_SYNC
# Note that each benchmark is set to run for 300 seconds (5 min) with warm-up set to 60 seconds (1 minute).
CONFIGS="\
-cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteSqlQueryBenchmark -sn IgniteNode -ds ${ver}sql-query-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteSqlQueryOffHeapBenchmark -sn IgniteNode -ds ${ver}sql-query-offheap-${b}-backup,\
-cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteSqlQueryJoinBenchmark -sn IgniteNode -ds ${ver}sql-query-join-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteSqlQueryJoinOffHeapBenchmark -sn IgniteNode -ds ${ver}sql-query-join-offheap-${b}-backup,\
-cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteSqlQueryPutBenchmark -sn IgniteNode -ds ${ver}sql-query-put-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteSqlQueryPutOffHeapBenchmark -sn IgniteNode -ds ${ver}sql-query-put-offheap-${b}-backup,\
-cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -jdbc jdbc:ignite://127.0.0.1/query -t ${t} -sm ${sm} -dn IgniteJdbcSqlQueryBenchmark -sn IgniteNode -ds ${ver}sql-query-jdbc-${b}-backup,\
-cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -jdbc jdbc:ignite:cfg://cache=query@config/ignite-jdbc-config.xml -t ${t} -sm ${sm} -dn IgniteJdbcSqlQueryBenchmark -sn IgniteNode -ds ${ver}sql-query-jdbc-${b}-backup\
"
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/yardstick/config/benchmark-tx-win.properties
----------------------------------------------------------------------
diff --git a/modules/yardstick/config/benchmark-tx-win.properties b/modules/yardstick/config/benchmark-tx-win.properties
index 490b9d7..ad9cc41 100644
--- a/modules/yardstick/config/benchmark-tx-win.properties
+++ b/modules/yardstick/config/benchmark-tx-win.properties
@@ -56,8 +56,4 @@ set CONFIGS=^
-cfg %SCRIPT_DIR%\..\config\ignite-localhost-config.xml -b 1 -w 60 -d 300 -t 64 -sm PRIMARY_SYNC -dn IgnitePutTxBenchmark -sn IgniteNode -ds tx-put-1-backup,^
-cfg %SCRIPT_DIR%\..\config\ignite-localhost-config.xml -b 1 -w 60 -d 300 -t 64 -sm PRIMARY_SYNC -dn IgniteGetAndPutTxBenchmark -sn IgniteNode -ds tx-getAndPut-1-backup,^
-cfg %SCRIPT_DIR%\..\config\ignite-localhost-config.xml -b 1 -w 60 -d 300 -t 64 -sm PRIMARY_SYNC -dn IgniteInvokeTxBenchmark -sn IgniteNode -ds tx-invoke-1-backup,^
--cfg %SCRIPT_DIR%\..\config\ignite-localhost-config.xml -b 1 -w 60 -d 300 -t 64 -sm PRIMARY_SYNC -dn IgnitePutTxOffHeapBenchmark -sn IgniteNode -ds tx-put-offheap-1-backup,^
--cfg %SCRIPT_DIR%\..\config\ignite-localhost-config.xml -b 1 -w 60 -d 300 -t 64 -sm PRIMARY_SYNC -dn IgnitePutTxOffHeapValuesBenchmark -sn IgniteNode -ds tx-put-offheap-val-1-backup,^
--cfg %SCRIPT_DIR%\..\config\ignite-localhost-config.xml -b 1 -w 60 -d 300 -t 64 -sm PRIMARY_SYNC -dn IgnitePutGetTxBenchmark -sn IgniteNode -ds tx-put-get-1-backup,^
--cfg %SCRIPT_DIR%\..\config\ignite-localhost-config.xml -b 1 -w 60 -d 300 -t 64 -sm PRIMARY_SYNC -dn IgnitePutGetTxOffHeapBenchmark -sn IgniteNode -ds tx-put-get-offheap-1-backup,^
--cfg %SCRIPT_DIR%\..\config\ignite-localhost-config.xml -b 1 -w 60 -d 300 -t 64 -sm PRIMARY_SYNC -dn IgnitePutGetTxOffHeapValuesBenchmark -sn IgniteNode -ds tx-put-get-offheap-val-1-backup
+-cfg %SCRIPT_DIR%\..\config\ignite-localhost-config.xml -b 1 -w 60 -d 300 -t 64 -sm PRIMARY_SYNC -dn IgnitePutGetTxBenchmark -sn IgniteNode -ds tx-put-get-1-backup
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/yardstick/config/benchmark-tx.properties
----------------------------------------------------------------------
diff --git a/modules/yardstick/config/benchmark-tx.properties b/modules/yardstick/config/benchmark-tx.properties
index 8a75bf5..8926578 100644
--- a/modules/yardstick/config/benchmark-tx.properties
+++ b/modules/yardstick/config/benchmark-tx.properties
@@ -77,9 +77,5 @@ CONFIGS="\
-cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgnitePutTxBenchmark -sn IgniteNode -ds ${ver}tx-put-${b}-backup,\
-cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteGetAndPutTxBenchmark -sn IgniteNode -ds ${ver}tx-getAndPut-${b}-backup,\
-cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteInvokeTxBenchmark -sn IgniteNode -ds ${ver}tx-invoke-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgnitePutTxOffHeapBenchmark -sn IgniteNode -ds ${ver}tx-put-offheap-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgnitePutTxOffHeapValuesBenchmark -sn IgniteNode -ds ${ver}tx-put-offheap-val-${b}-backup,\
-cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgnitePutGetTxBenchmark -sn IgniteNode -ds ${ver}tx-put-get-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgnitePutGetTxOffHeapBenchmark -sn IgniteNode -ds ${ver}tx-put-get-offheap-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgnitePutGetTxOffHeapValuesBenchmark -sn IgniteNode -ds ${ver}tx-put-get-offheap-val-${b}-backup\
"
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/yardstick/config/benchmark.properties
----------------------------------------------------------------------
diff --git a/modules/yardstick/config/benchmark.properties b/modules/yardstick/config/benchmark.properties
index cccbf2a..2dd51eb 100644
--- a/modules/yardstick/config/benchmark.properties
+++ b/modules/yardstick/config/benchmark.properties
@@ -95,16 +95,7 @@ CONFIGS="\
-cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -j ${j} -dn IgniteApplyBenchmark -sn IgniteNode -ds ${ver}apply-compute-${b}-backup,\
-cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -j ${j} -dn IgniteBroadcastBenchmark -sn IgniteNode -ds ${ver}broad-compute-${b}-backup,\
-cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -j ${j} -dn IgniteExecuteBenchmark -sn IgniteNode -ds ${ver}exec-compute-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -j ${j} -dn IgniteRunBenchmark -sn IgniteNode -ds ${ver}run-compute-${b}-backup\
--cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgnitePutGetOffHeapBenchmark -sn IgniteNode -ds ${ver}atomic-put-get-offheap-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgnitePutGetOffHeapValuesBenchmark -sn IgniteNode -ds ${ver}atomic-put-get-offheap-val-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgnitePutOffHeapBenchmark -sn IgniteNode -ds ${ver}atomic-put-offheap-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgnitePutOffHeapValuesBenchmark -sn IgniteNode -ds ${ver}atomic-put-offheap-val-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgnitePutTxOffHeapBenchmark -sn IgniteNode -ds ${ver}tx-put-offheap-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgnitePutTxOffHeapValuesBenchmark -sn IgniteNode -ds ${ver}tx-put-offheap-val-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteSqlQueryOffHeapBenchmark -sn IgniteNode -ds ${ver}sql-query-offheap-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteSqlQueryJoinOffHeapBenchmark -sn IgniteNode -ds ${ver}sql-query-join-offheap-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteSqlQueryPutOffHeapBenchmark -sn IgniteNode -ds ${ver}sql-query-put-offheap-${b}-backup,\
+-cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -j ${j} -dn IgniteRunBenchmark -sn IgniteNode -ds ${ver}run-compute-${b}-backup,\
-cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -bs 1000 -sm PRIMARY_SYNC -dn IgnitePutAllBenchmark -sn IgniteNode -ds ${ver}atomic-putAll-${b}-backup,\
-cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -bs 1000 -col -sm PRIMARY_SYNC -dn IgnitePutAllBenchmark -sn IgniteNode -ds ${ver}atomic-collocated-putAll-${b}-backup,\
-cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -bs 1000 -sm PRIMARY_SYNC -dn IgnitePutAllTxBenchmark -sn IgniteNode -ds ${ver}atomic-putAll-tx-${b}-backup,\
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/yardstick/config/ignite-base-config.xml
----------------------------------------------------------------------
diff --git a/modules/yardstick/config/ignite-base-config.xml b/modules/yardstick/config/ignite-base-config.xml
index 4416657..57380d0 100644
--- a/modules/yardstick/config/ignite-base-config.xml
+++ b/modules/yardstick/config/ignite-base-config.xml
@@ -40,27 +40,6 @@
</bean>
<bean class="org.apache.ignite.configuration.CacheConfiguration">
- <property name="name" value="atomic-offheap"/>
-
- <property name="cacheMode" value="PARTITIONED"/>
-
- <property name="atomicityMode" value="ATOMIC"/>
-
- <property name="memoryMode" value="OFFHEAP_TIERED"/>
- </bean>
-
- <bean class="org.apache.ignite.configuration.CacheConfiguration">
- <property name="name" value="atomic-offheap-values"/>
-
- <property name="cacheMode" value="PARTITIONED"/>
-
- <property name="atomicityMode" value="ATOMIC"/>
-
- <property name="memoryMode" value="OFFHEAP_VALUES"/>
-
- </bean>
-
- <bean class="org.apache.ignite.configuration.CacheConfiguration">
<property name="name" value="tx"/>
<property name="cacheMode" value="PARTITIONED"/>
@@ -70,28 +49,6 @@
</bean>
<bean class="org.apache.ignite.configuration.CacheConfiguration">
- <property name="name" value="tx-offheap"/>
-
- <property name="cacheMode" value="PARTITIONED"/>
-
- <property name="atomicityMode" value="TRANSACTIONAL"/>
-
- <property name="memoryMode" value="OFFHEAP_TIERED"/>
-
- </bean>
-
- <bean class="org.apache.ignite.configuration.CacheConfiguration">
- <property name="name" value="tx-offheap-values"/>
-
- <property name="cacheMode" value="PARTITIONED"/>
-
- <property name="atomicityMode" value="TRANSACTIONAL"/>
-
- <property name="memoryMode" value="OFFHEAP_VALUES"/>
-
- </bean>
-
- <bean class="org.apache.ignite.configuration.CacheConfiguration">
<property name="name" value="atomic-index"/>
<property name="cacheMode" value="PARTITIONED"/>
@@ -188,26 +145,6 @@
</bean>
<bean class="org.apache.ignite.configuration.CacheConfiguration">
- <property name="name" value="query-offheap"/>
-
- <property name="cacheMode" value="PARTITIONED"/>
-
- <property name="atomicityMode" value="ATOMIC"/>
-
- <property name="memoryMode" value="OFFHEAP_TIERED"/>
-
- <property name="indexedTypes">
- <list>
- <value>java.lang.Integer</value>
- <value>org.apache.ignite.yardstick.cache.model.Organization</value>
-
- <value>java.lang.Integer</value>
- <value>org.apache.ignite.yardstick.cache.model.Person</value>
- </list>
- </property>
- </bean>
-
- <bean class="org.apache.ignite.configuration.CacheConfiguration">
<property name="name" value="compute"/>
<property name="cacheMode" value="PARTITIONED"/>
[08/17] ignite git commit: IGNITE-4535 - Add option to store
deserialized values on-heap
Posted by ag...@apache.org.
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedEvictionSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedEvictionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedEvictionSelfTest.java
deleted file mode 100644
index 4233244..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedEvictionSelfTest.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.internal.processors.cache.distributed.replicated;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.UUID;
-import org.apache.ignite.cache.CacheMode;
-import org.apache.ignite.configuration.CacheConfiguration;
-import org.apache.ignite.configuration.NearCacheConfiguration;
-import org.apache.ignite.events.Event;
-import org.apache.ignite.internal.processors.cache.GridCacheAbstractSelfTest;
-import org.apache.ignite.internal.util.typedef.P1;
-import org.apache.ignite.internal.util.typedef.PA;
-import org.apache.ignite.lang.IgniteFuture;
-import org.apache.ignite.lang.IgnitePredicate;
-import org.apache.ignite.testframework.GridTestUtils;
-
-import static org.apache.ignite.cache.CacheMode.REPLICATED;
-import static org.apache.ignite.events.EventType.EVT_CACHE_ENTRY_EVICTED;
-
-/**
- * Tests synchronous eviction for replicated cache.
- */
-public class GridCacheReplicatedEvictionSelfTest extends GridCacheAbstractSelfTest {
- /** {@inheritDoc} */
- @Override protected int gridCount() {
- return 4;
- }
-
- /** {@inheritDoc} */
- @Override protected CacheMode cacheMode() {
- return REPLICATED;
- }
-
- /** {@inheritDoc} */
- @Override protected CacheConfiguration cacheConfiguration(String igniteInstanceName) throws Exception {
- CacheConfiguration ccfg = super.cacheConfiguration(igniteInstanceName);
-
- ccfg.setEvictSynchronized(true);
- ccfg.setEvictSynchronizedKeyBufferSize(1);
-
- return ccfg;
- }
-
- /** {@inheritDoc} */
- @Override protected NearCacheConfiguration nearConfiguration() {
- return null;
- }
-
- /** {@inheritDoc} */
- @Override protected boolean swapEnabled() {
- return false;
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testEvictSynchronized() throws Exception {
- final int KEYS = 10;
-
- for (int i = 0; i < KEYS; i++)
- jcache(0).put(String.valueOf(i), i);
-
- for (int g = 0 ; g < gridCount(); g++) {
- for (int i = 0; i < KEYS; i++)
- assertNotNull(jcache(g).localPeek(String.valueOf(i)));
- }
-
- Collection<IgniteFuture<Event>> futs = new ArrayList<>();
-
- for (int g = 0 ; g < gridCount(); g++)
- futs.add(waitForLocalEvent(grid(g).events(), nodeEvent(grid(g).localNode().id()), EVT_CACHE_ENTRY_EVICTED));
-
- for (int g = 0; g < gridCount(); g++) {
- for (int i = 0; i < KEYS; i++) {
- if (grid(g).affinity(null).isPrimary(grid(g).localNode(), String.valueOf(i)))
- jcache(g).localEvict(Collections.singleton(String.valueOf(i)));
- }
- }
-
- for (IgniteFuture<Event> fut : futs)
- fut.get(3000);
-
- boolean evicted = GridTestUtils.waitForCondition(new PA() {
- @Override public boolean apply() {
- for (int g = 0 ; g < gridCount(); g++) {
- for (int i = 0; i < KEYS; i++) {
- if (jcache(g).localPeek(String.valueOf(i)) != null) {
- log.info("Non-null value, will wait [grid=" + g + ", key=" + i + ']');
-
- return false;
- }
- }
- }
-
- return true;
- }
- }, 3000);
-
- assertTrue(evicted);
- }
-
- /**
- * @param nodeId Node id.
- * @return Predicate for events belonging to specified node.
- */
- private IgnitePredicate<Event> nodeEvent(final UUID nodeId) {
- assert nodeId != null;
-
- return new P1<Event>() {
- @Override public boolean apply(Event e) {
- info("Predicate called [e.nodeId()=" + e.node().id() + ", nodeId=" + nodeId + ']');
-
- return e.node().id().equals(nodeId);
- }
- };
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedOffHeapFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedOffHeapFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedOffHeapFullApiSelfTest.java
deleted file mode 100644
index 9a6703b..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedOffHeapFullApiSelfTest.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.internal.processors.cache.distributed.replicated;
-
-import org.apache.ignite.cache.CacheMemoryMode;
-
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_VALUES;
-
-/**
- * Tests replicated cache with values being stored off-heap.
- */
-public class GridCacheReplicatedOffHeapFullApiSelfTest extends GridCacheReplicatedFullApiSelfTest {
- /** {@inheritDoc} */
- @Override protected CacheMemoryMode memoryMode() {
- return OFFHEAP_VALUES;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedOffHeapMultiNodeFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedOffHeapMultiNodeFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedOffHeapMultiNodeFullApiSelfTest.java
deleted file mode 100644
index 237e5f5..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedOffHeapMultiNodeFullApiSelfTest.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.internal.processors.cache.distributed.replicated;
-
-import org.apache.ignite.cache.CacheMemoryMode;
-
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_VALUES;
-
-/**
- * Tests replicated cache with values being stored off-heap.
- */
-public class GridCacheReplicatedOffHeapMultiNodeFullApiSelfTest extends GridCacheReplicatedMultiNodeFullApiSelfTest {
- /** {@inheritDoc} */
- @Override protected CacheMemoryMode memoryMode() {
- return OFFHEAP_VALUES;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedOffHeapTieredFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedOffHeapTieredFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedOffHeapTieredFullApiSelfTest.java
deleted file mode 100644
index 4f909e4..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedOffHeapTieredFullApiSelfTest.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.internal.processors.cache.distributed.replicated;
-
-import org.apache.ignite.cache.CacheMemoryMode;
-
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
-
-/**
- * Tests replicated cache with off-heap tiered mode.
- */
-public class GridCacheReplicatedOffHeapTieredFullApiSelfTest extends
- GridCacheReplicatedOffHeapFullApiSelfTest {
- /** {@inheritDoc} */
- @Override protected CacheMemoryMode memoryMode() {
- return OFFHEAP_TIERED;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedOffHeapTieredMultiNodeFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedOffHeapTieredMultiNodeFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedOffHeapTieredMultiNodeFullApiSelfTest.java
deleted file mode 100644
index babe1c4..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedOffHeapTieredMultiNodeFullApiSelfTest.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.internal.processors.cache.distributed.replicated;
-
-import org.apache.ignite.cache.CacheMemoryMode;
-
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
-
-/**
- * Tests replicated cache with off-heap tiered mode.
- */
-public class GridCacheReplicatedOffHeapTieredMultiNodeFullApiSelfTest extends
- GridCacheReplicatedOffHeapMultiNodeFullApiSelfTest{
- /** {@inheritDoc} */
- @Override protected CacheMemoryMode memoryMode() {
- return OFFHEAP_TIERED;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedOnheapFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedOnheapFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedOnheapFullApiSelfTest.java
new file mode 100644
index 0000000..4280277
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedOnheapFullApiSelfTest.java
@@ -0,0 +1,26 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.ignite.internal.processors.cache.distributed.replicated;
+
+public class GridCacheReplicatedOnheapFullApiSelfTest extends GridCacheReplicatedFullApiSelfTest {
+ /** {@inheritDoc} */
+ @Override protected boolean onheapCacheEnabled() {
+ return true;
+ }
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedOnheapMultiNodeFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedOnheapMultiNodeFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedOnheapMultiNodeFullApiSelfTest.java
new file mode 100644
index 0000000..cd04b58
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedOnheapMultiNodeFullApiSelfTest.java
@@ -0,0 +1,26 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.ignite.internal.processors.cache.distributed.replicated;
+
+public class GridCacheReplicatedOnheapMultiNodeFullApiSelfTest extends GridCacheReplicatedMultiNodeFullApiSelfTest {
+ /** {@inheritDoc} */
+ @Override protected boolean onheapCacheEnabled() {
+ return true;
+ }
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/preloader/GridCacheReplicatedPreloadOffHeapSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/preloader/GridCacheReplicatedPreloadOffHeapSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/preloader/GridCacheReplicatedPreloadOffHeapSelfTest.java
deleted file mode 100644
index b4f9960..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/preloader/GridCacheReplicatedPreloadOffHeapSelfTest.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.internal.processors.cache.distributed.replicated.preloader;
-
-import org.apache.ignite.configuration.CacheConfiguration;
-
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_VALUES;
-
-/**
- * Tests for replicated cache preloader.
- */
-public class GridCacheReplicatedPreloadOffHeapSelfTest extends GridCacheReplicatedPreloadSelfTest {
- /** {@inheritDoc} */
- @Override CacheConfiguration cacheConfiguration(String igniteInstanceName) {
- CacheConfiguration cacheCfg = super.cacheConfiguration(igniteInstanceName);
-
- cacheCfg.setMemoryMode(OFFHEAP_VALUES);
- cacheCfg.setOffHeapMaxMemory(0);
-
- return cacheCfg;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/EvictionAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/EvictionAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/EvictionAbstractTest.java
index 707bfba..b6fcebc 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/EvictionAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/EvictionAbstractTest.java
@@ -75,12 +75,6 @@ public abstract class EvictionAbstractTest<T extends EvictionPolicy<?, ?>>
/** Near enabled flag. */
protected boolean nearEnabled;
- /** Evict backup sync. */
- protected boolean evictSync;
-
- /** Evict near sync. */
- protected boolean evictNearSync = true;
-
/** Policy max. */
protected int plcMax = 10;
@@ -110,7 +104,7 @@ public abstract class EvictionAbstractTest<T extends EvictionPolicy<?, ?>>
cc.setCacheMode(mode);
cc.setEvictionPolicy(createPolicy(plcMax));
- cc.setEvictSynchronized(evictSync);
+ cc.setOnheapCacheEnabled(true);
cc.setWriteSynchronizationMode(syncCommit ? FULL_SYNC : FULL_ASYNC);
cc.setStartSize(plcMax);
cc.setAtomicityMode(TRANSACTIONAL);
@@ -705,7 +699,6 @@ public abstract class EvictionAbstractTest<T extends EvictionPolicy<?, ?>>
nearEnabled = true;
nearMax = 3;
plcMax = 10;
- evictNearSync = true;
syncCommit = true;
gridCnt = 2;
@@ -718,19 +711,6 @@ public abstract class EvictionAbstractTest<T extends EvictionPolicy<?, ?>>
mode = PARTITIONED;
nearEnabled = false;
plcMax = 100;
- evictSync = false;
-
- gridCnt = 2;
-
- checkPartitionedMultiThreaded();
- }
-
- /** @throws Exception If failed. */
- public void testPartitionedNearDisabledBackupSyncMultiThreaded() throws Exception {
- mode = PARTITIONED;
- nearEnabled = false;
- plcMax = 100;
- evictSync = true;
gridCnt = 2;
@@ -742,19 +722,6 @@ public abstract class EvictionAbstractTest<T extends EvictionPolicy<?, ?>>
mode = PARTITIONED;
nearEnabled = true;
plcMax = 10;
- evictSync = false;
-
- gridCnt = 2;
-
- checkPartitionedMultiThreaded();
- }
-
- /** @throws Exception If failed. */
- public void testPartitionedNearEnabledBackupSyncMultiThreaded() throws Exception {
- mode = PARTITIONED;
- nearEnabled = true;
- plcMax = 10;
- evictSync = true;
gridCnt = 2;
@@ -814,7 +781,7 @@ public abstract class EvictionAbstractTest<T extends EvictionPolicy<?, ?>>
if (plcMax > 0) {
for (int i = 0; i < gridCnt; i++) {
- int actual = colocated(i).size();
+ int actual = colocated(i).map().keySet().size();
assertTrue("Cache size is greater then policy size [expected=" + endSize + ", actual=" + actual + ']',
actual <= endSize + (plcMaxMemSize > 0 ? 1 : plcBatchSize));
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheBatchEvictUnswapSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheBatchEvictUnswapSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheBatchEvictUnswapSelfTest.java
deleted file mode 100644
index 67700b6..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheBatchEvictUnswapSelfTest.java
+++ /dev/null
@@ -1,199 +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.eviction;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.concurrent.atomic.AtomicInteger;
-import org.apache.ignite.Ignite;
-import org.apache.ignite.IgniteCache;
-import org.apache.ignite.IgniteException;
-import org.apache.ignite.cache.CacheMode;
-import org.apache.ignite.cache.eviction.fifo.FifoEvictionPolicy;
-import org.apache.ignite.cache.store.CacheStore;
-import org.apache.ignite.cache.store.CacheStoreAdapter;
-import org.apache.ignite.configuration.CacheConfiguration;
-import org.apache.ignite.internal.IgniteInternalFuture;
-import org.apache.ignite.internal.processors.cache.GridCacheAbstractSelfTest;
-import org.apache.ignite.lang.IgniteBiInClosure;
-import org.jetbrains.annotations.Nullable;
-
-/**
- * Swap benchmark.
- */
-@SuppressWarnings("BusyWait")
-public class GridCacheBatchEvictUnswapSelfTest extends GridCacheAbstractSelfTest {
- /** Eviction policy size. */
- public static final int EVICT_PLC_SIZE = 100000;
-
- /** Keys count. */
- public static final int KEYS_CNT = 100000;
-
- /** Batch size. */
- private static final int BATCH_SIZE = 200;
-
- /** Number of threads for concurrent benchmark + concurrency level. */
- private static final int N_THREADS = 8;
-
- /** {@inheritDoc} */
- @Override protected int gridCount() {
- return 1;
- }
-
- /** {@inheritDoc} */
- @Override protected long getTestTimeout() {
- // Let this test run 2 minutes as it runs for 20 seconds locally.
- return 2 * 60 * 1000;
- }
-
- /** {@inheritDoc} */
- @SuppressWarnings("unchecked")
- @Override protected CacheConfiguration cacheConfiguration(String igniteInstanceName) throws Exception {
- CacheConfiguration cacheCfg = super.cacheConfiguration(igniteInstanceName);
-
- cacheCfg.setCacheMode(CacheMode.PARTITIONED);
-
- CacheStore store = new CacheStoreAdapter<Long, String>() {
- @Nullable @Override public String load(Long key) {
- return null;
- }
-
- @Override public void loadCache(final IgniteBiInClosure<Long, String> c,
- @Nullable Object... args) {
- for (int i = 0; i < KEYS_CNT; i++)
- c.apply((long)i, String.valueOf(i));
- }
-
- @Override public void write(javax.cache.Cache.Entry<? extends Long, ? extends String> val) {
- // No-op.
- }
-
- @Override public void delete(Object key) {
- // No-op.
- }
- };
-
- cacheCfg.setCacheStoreFactory(singletonFactory(store));
- cacheCfg.setReadThrough(true);
- cacheCfg.setWriteThrough(true);
- cacheCfg.setLoadPreviousValue(true);
-
- FifoEvictionPolicy plc = new FifoEvictionPolicy();
- plc.setMaxSize(EVICT_PLC_SIZE);
-
- cacheCfg.setEvictionPolicy(plc);
- cacheCfg.setEvictSynchronized(false);
- cacheCfg.setNearConfiguration(null);
-
- return cacheCfg;
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testConcurrentEvictions() throws Exception {
- runConcurrentTest(grid(0), KEYS_CNT, BATCH_SIZE);
- }
-
- /**
- * @param g Grid instance.
- * @param keysCnt Number of keys to swap and promote.
- * @param batchSize Size of batch to swap/promote.
- * @throws Exception If failed.
- */
- private void runConcurrentTest(Ignite g, final int keysCnt, final int batchSize) throws Exception {
- assert keysCnt % batchSize == 0;
-
- final AtomicInteger evictedKeysCnt = new AtomicInteger();
-
- final IgniteCache<Object, Object> cache = g.cache(null);
-
- cache.loadCache(null, 0);
-
- info("Finished load cache.");
-
- IgniteInternalFuture<?> evictFut = multithreadedAsync(new Runnable() {
- @Override public void run() {
- Collection<Long> keys = new ArrayList<>(batchSize);
-
- int evictedBatches = 0;
-
- for (long i = 0; i < keysCnt; i++) {
- keys.add(i);
-
- if (keys.size() == batchSize) {
- for (Long key : keys)
- cache.localEvict(Collections.<Object>singleton(key));
-
- evictedKeysCnt.addAndGet(batchSize);
-
- keys.clear();
-
- evictedBatches++;
-
- if (evictedBatches % 100 == 0 && evictedBatches > 0)
- info("Evicted " + (evictedBatches * batchSize) + " entries.");
- }
- }
- }
- }, N_THREADS, "evict");
-
- final AtomicInteger unswappedKeys = new AtomicInteger();
-
- IgniteInternalFuture<?> unswapFut = multithreadedAsync(new Runnable() {
- @Override public void run() {
- try {
- Collection<Long> keys = new ArrayList<>(batchSize);
-
- int unswappedBatches = 0;
-
- for (long i = 0; i < keysCnt; i++) {
- keys.add(i);
-
- if (keys.size() == batchSize) {
- for (Long key : keys)
- cache.localPromote(Collections.singleton(key));
-
- unswappedKeys.addAndGet(batchSize);
-
- keys.clear();
-
- unswappedBatches++;
-
- if (unswappedBatches % 100 == 0 && unswappedBatches > 0)
- info("Unswapped " + (unswappedBatches * batchSize) + " entries.");
- }
- }
- }
- catch (IgniteException e) {
- e.printStackTrace();
- }
- }
- }, N_THREADS, "promote");
-
- evictFut.get();
-
- unswapFut.get();
-
- info("Clearing cache.");
-
- for (long i = 0; i < KEYS_CNT; i++)
- cache.remove(i);
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheConcurrentEvictionConsistencySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheConcurrentEvictionConsistencySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheConcurrentEvictionConsistencySelfTest.java
index f7ef897..e61bef6 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheConcurrentEvictionConsistencySelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheConcurrentEvictionConsistencySelfTest.java
@@ -24,6 +24,7 @@ import java.util.concurrent.Callable;
import javax.cache.Cache;
import org.apache.ignite.Ignite;
import org.apache.ignite.IgniteCache;
+import org.apache.ignite.cache.CachePeekMode;
import org.apache.ignite.cache.eviction.EvictableEntry;
import org.apache.ignite.cache.eviction.EvictionPolicy;
import org.apache.ignite.cache.eviction.fifo.FifoEvictionPolicy;
@@ -83,6 +84,7 @@ public class GridCacheConcurrentEvictionConsistencySelfTest extends GridCommonAb
cc.setNearConfiguration(null);
cc.setEvictionPolicy(plc);
+ cc.setOnheapCacheEnabled(true);
c.setCacheConfiguration(cc);
@@ -295,10 +297,10 @@ public class GridCacheConcurrentEvictionConsistencySelfTest extends GridCommonAb
if (detached)
fail("Eviction policy contains keys that are not present in cache");
- if (!(cache.localSize() == 0)) {
+ if (!(cache.localSize(CachePeekMode.ONHEAP) == 0)) {
boolean zombies = false;
- for (Cache.Entry<Integer, Integer> e : cache) {
+ for (Cache.Entry<Integer, Integer> e : cache.localEntries(CachePeekMode.ONHEAP)) {
U.warn(log, "Zombie entry: " + e);
zombies = true;
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheConcurrentEvictionsSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheConcurrentEvictionsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheConcurrentEvictionsSelfTest.java
index 8eb029e..31d7c26 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheConcurrentEvictionsSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheConcurrentEvictionsSelfTest.java
@@ -75,6 +75,7 @@ public class GridCacheConcurrentEvictionsSelfTest extends GridCommonAbstractTest
cc.setNearConfiguration(null);
cc.setEvictionPolicy(plc);
+ cc.setOnheapCacheEnabled(true);
c.setCacheConfiguration(cc);
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheDistributedEvictionsSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheDistributedEvictionsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheDistributedEvictionsSelfTest.java
deleted file mode 100644
index 7621897..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheDistributedEvictionsSelfTest.java
+++ /dev/null
@@ -1,235 +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.eviction;
-
-import java.util.TreeSet;
-import java.util.concurrent.atomic.AtomicInteger;
-import org.apache.ignite.Ignite;
-import org.apache.ignite.IgniteCache;
-import org.apache.ignite.cache.CacheMode;
-import org.apache.ignite.cache.CacheWriteSynchronizationMode;
-import org.apache.ignite.cache.eviction.fifo.FifoEvictionPolicy;
-import org.apache.ignite.configuration.CacheConfiguration;
-import org.apache.ignite.configuration.IgniteConfiguration;
-import org.apache.ignite.configuration.NearCacheConfiguration;
-import org.apache.ignite.configuration.TransactionConfiguration;
-import org.apache.ignite.internal.processors.cache.distributed.GridCacheModuloAffinityFunction;
-import org.apache.ignite.internal.util.typedef.F;
-import org.apache.ignite.internal.util.typedef.internal.U;
-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.junits.common.GridCommonAbstractTest;
-
-import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-import static org.apache.ignite.cache.CacheMode.LOCAL;
-import static org.apache.ignite.cache.CacheMode.PARTITIONED;
-import static org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC;
-import static org.apache.ignite.transactions.TransactionIsolation.READ_COMMITTED;
-
-/**
- *
- */
-public class GridCacheDistributedEvictionsSelfTest extends GridCommonAbstractTest {
- /** IP finder. */
- private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true);
-
- /** */
- private int gridCnt = 2;
-
- /** */
- private CacheMode mode;
-
- /** */
- private boolean nearEnabled;
-
- /** */
- private boolean evictSync;
-
- /** */
- private final AtomicInteger idxGen = new AtomicInteger();
-
- /** {@inheritDoc} */
- @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
- IgniteConfiguration c = super.getConfiguration(igniteInstanceName);
-
- TransactionConfiguration tCfg = new TransactionConfiguration();
-
- tCfg.setDefaultTxConcurrency(PESSIMISTIC);
- tCfg.setDefaultTxIsolation(READ_COMMITTED);
-
- c.setTransactionConfiguration(tCfg);
-
- CacheConfiguration cc = defaultCacheConfiguration();
-
- cc.setCacheMode(mode);
- cc.setAtomicityMode(TRANSACTIONAL);
-
- if (nearEnabled) {
- NearCacheConfiguration nearCfg = new NearCacheConfiguration();
-
- cc.setNearConfiguration(nearCfg);
- }
-
- cc.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC);
-
- // Set only DHT policy, leave default near policy.
- FifoEvictionPolicy plc = new FifoEvictionPolicy();
- plc.setMaxSize(10);
-
- cc.setEvictionPolicy(plc);
- cc.setEvictSynchronized(evictSync);
- cc.setEvictSynchronizedKeyBufferSize(1);
-
- cc.setAffinity(new GridCacheModuloAffinityFunction(gridCnt, 1));
-
- c.setCacheConfiguration(cc);
-
- TcpDiscoverySpi disco = new TcpDiscoverySpi();
-
- disco.setIpFinder(ipFinder);
-
- c.setDiscoverySpi(disco);
-
- c.setUserAttributes(F.asMap(GridCacheModuloAffinityFunction.IDX_ATTR, idxGen.getAndIncrement()));
-
- return c;
- }
-
- /** {@inheritDoc} */
- @Override protected void afterTest() throws Exception {
- stopAllGrids();
-
- super.afterTest();
- }
-
- /** @throws Throwable If failed. */
- public void testNearSyncBackupSync() throws Throwable {
- gridCnt = 3;
- mode = PARTITIONED;
- evictSync = true;
- nearEnabled = true;
-
- checkEvictions();
- }
-
- /**
- * @throws Throwable If failed.
- */
- public void testLocalSync() throws Throwable {
- gridCnt = 1;
- mode = LOCAL;
- evictSync = true;
- nearEnabled = true;
-
- Ignite g = startGrid(0);
-
- final IgniteCache<Integer, Integer> cache = g.cache(null);
-
- for (int i = 1; i < 20; i++) {
- cache.put(i * gridCnt, i * gridCnt);
-
- info("Put to cache: " + i * gridCnt);
- }
- }
-
- /** @throws Throwable If failed. */
- private void checkEvictions() throws Throwable {
- try {
- startGrids(gridCnt);
-
- Ignite ignite = grid(0);
-
- final IgniteCache<Integer, Integer> cache = ignite.cache(null);
-
- // Put 1 entry to primary node.
- cache.put(0, 0);
-
- Integer nearVal = this.<Integer, Integer>jcache(2).get(0);
-
- assert nearVal == 0 : "Unexpected near value: " + nearVal;
-
- // Put several vals to primary node.
- for (int i = 1; i < 20; i++) {
- cache.put(i * gridCnt, i * gridCnt);
-
- info("Put to cache: " + i * gridCnt);
- }
-
- for (int i = 0; i < 3; i++) {
- try {
- assert jcache(2).get(0) == null : "Entry has not been evicted from near node for key: " + 0;
- assert jcache(1).get(0) == null : "Entry has not been evicted from backup node for key: " + 0;
- assert cache.get(0) == null : "Entry has not been evicted from primary node for key: " + 0;
- }
- catch (Throwable e) {
- if (i == 2)
- // No attempts left.
- throw e;
-
- U.warn(log, "Check failed (will retry in 2000 ms): " + e);
-
- // Unwind evicts?
- cache.get(0);
-
- U.sleep(2000);
- }
- }
-
- for (int i = 0; i < 3; i++) {
- info("Primary key set: " + new TreeSet<>(this.<Integer, Integer>dht(0).keySet()));
- info("Primary near key set: " + new TreeSet<>(this.<Integer, Integer>near(0).keySet()));
-
- info("Backup key set: " + new TreeSet<>(this.<Integer, Integer>dht(1).keySet()));
- info("Backup near key set: " + new TreeSet<>(this.<Integer, Integer>near(1).keySet()));
-
- info("Near key set: " + new TreeSet<>(this.<Integer, Integer>dht(2).keySet()));
- info("Near node near key set: " + new TreeSet<>(this.<Integer, Integer>near(2).keySet()));
-
- try {
- assert cache.localSize() == 10 : "Invalid cache size [size=" + cache.localSize() + ']';
- assert cache.localSize() == 10 : "Invalid key size [size=" + cache.localSize() + ']';
-
- assert jcache(2).localSize() == 0;
-
- break;
- }
- catch (Throwable e) {
- if (i == 2)
- // No attempts left.
- throw e;
-
- U.warn(log, "Check failed (will retry in 2000 ms): " + e);
-
- // Unwind evicts?
- cache.get(0);
-
- U.sleep(2000);
- }
- }
- }
- catch (Throwable t) {
- error("Test failed.", t);
-
- throw t;
- }
- finally {
- stopAllGrids();
- }
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEmptyEntriesAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEmptyEntriesAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEmptyEntriesAbstractSelfTest.java
index 0c4ac3f..c97f2ca 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEmptyEntriesAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEmptyEntriesAbstractSelfTest.java
@@ -83,9 +83,7 @@ public abstract class GridCacheEmptyEntriesAbstractSelfTest extends GridCommonAb
cc.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC);
cc.setEvictionPolicy(plc);
- cc.setEvictSynchronizedKeyBufferSize(1);
-
- cc.setEvictSynchronized(true);
+ cc.setOnheapCacheEnabled(true);
if (testStore != null) {
cc.setCacheStoreFactory(singletonFactory(testStore));
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictableEntryEqualsSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictableEntryEqualsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictableEntryEqualsSelfTest.java
index 2b40365..98c8b77 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictableEntryEqualsSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictableEntryEqualsSelfTest.java
@@ -39,6 +39,7 @@ public class GridCacheEvictableEntryEqualsSelfTest extends GridCommonAbstractTes
CacheConfiguration<TestKey, String> cfg = new CacheConfiguration<>("test");
cfg.setEvictionPolicy(new TestEvictionPolicy());
+ cfg.setOnheapCacheEnabled(true);
IgniteCache<TestKey, String> cache = ignite.createCache(cfg);
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictionFilterSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictionFilterSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictionFilterSelfTest.java
index db23661..eb675ad 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictionFilterSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictionFilterSelfTest.java
@@ -74,7 +74,7 @@ public class GridCacheEvictionFilterSelfTest extends GridCommonAbstractTest {
cc.setCacheMode(mode);
cc.setEvictionPolicy(notSerializableProxy(plc, EvictionPolicy.class));
- cc.setEvictSynchronized(false);
+ cc.setOnheapCacheEnabled(true);
cc.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC);
cc.setEvictionFilter(notSerializableProxy(filter, org.apache.ignite.cache.eviction.EvictionFilter.class));
cc.setRebalanceMode(SYNC);
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictionLockUnlockSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictionLockUnlockSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictionLockUnlockSelfTest.java
index ba9b2d7..55b7b63 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictionLockUnlockSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictionLockUnlockSelfTest.java
@@ -73,6 +73,7 @@ public class GridCacheEvictionLockUnlockSelfTest extends GridCommonAbstractTest
cc.setCacheMode(mode);
cc.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC);
cc.setEvictionPolicy(new EvictionPolicy());
+ cc.setOnheapCacheEnabled(true);
cc.setAtomicityMode(TRANSACTIONAL);
NearCacheConfiguration nearCfg = new NearCacheConfiguration();
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictionTouchSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictionTouchSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictionTouchSelfTest.java
index d8746c8..396083e 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictionTouchSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictionTouchSelfTest.java
@@ -28,6 +28,7 @@ import java.util.TreeSet;
import javax.cache.Cache;
import org.apache.ignite.Ignite;
import org.apache.ignite.IgniteCache;
+import org.apache.ignite.cache.CachePeekMode;
import org.apache.ignite.cache.eviction.EvictionPolicy;
import org.apache.ignite.cache.eviction.fifo.FifoEvictionPolicy;
import org.apache.ignite.cache.store.CacheStore;
@@ -74,6 +75,7 @@ public class GridCacheEvictionTouchSelfTest extends GridCommonAbstractTest {
cc.setWriteSynchronizationMode(FULL_SYNC);
cc.setEvictionPolicy(plc);
+ cc.setOnheapCacheEnabled(true);
CacheStore store = new GridCacheGenericTestStore<Object, Object>() {
@Override public Object load(Object key) {
@@ -191,7 +193,7 @@ public class GridCacheEvictionTouchSelfTest extends GridCommonAbstractTest {
cache.localEvict(Collections.singleton(i));
assertEquals(0, ((FifoEvictionPolicy)plc).queue().size());
- assertEquals(0, cache.size());
+ assertEquals(0, cache.size(CachePeekMode.ONHEAP));
}
finally {
stopAllGrids();
@@ -226,7 +228,7 @@ public class GridCacheEvictionTouchSelfTest extends GridCommonAbstractTest {
cache.localEvict(Collections.singleton(key));
assertEquals(0, ((FifoEvictionPolicy)plc).queue().size());
- assertEquals(0, cache.size());
+ assertEquals(0, cache.size(CachePeekMode.ONHEAP));
}
finally {
stopAllGrids();
@@ -250,8 +252,7 @@ public class GridCacheEvictionTouchSelfTest extends GridCommonAbstractTest {
for (int i = 0; i < 10000; i++)
load(cache, i, true);
- assertEquals(100, cache.size());
- assertEquals(100, cache.size());
+ assertEquals(100, cache.size(CachePeekMode.ONHEAP));
assertEquals(100, ((FifoEvictionPolicy)plc).queue().size());
Set<Integer> keys = new TreeSet<>();
@@ -261,8 +262,7 @@ public class GridCacheEvictionTouchSelfTest extends GridCommonAbstractTest {
loadAll(cache, keys, true);
- assertEquals(100, cache.size());
- assertEquals(100, cache.size());
+ assertEquals(100, cache.size(CachePeekMode.ONHEAP));
assertEquals(100, ((FifoEvictionPolicy)plc).queue().size());
}
finally {
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheSynchronousEvictionsFailoverSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheSynchronousEvictionsFailoverSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheSynchronousEvictionsFailoverSelfTest.java
deleted file mode 100644
index 377afa0..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheSynchronousEvictionsFailoverSelfTest.java
+++ /dev/null
@@ -1,166 +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.eviction;
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Random;
-import java.util.concurrent.Callable;
-import java.util.concurrent.atomic.AtomicBoolean;
-import org.apache.ignite.IgniteCache;
-import org.apache.ignite.IgniteException;
-import org.apache.ignite.cache.CacheMode;
-import org.apache.ignite.cache.affinity.Affinity;
-import org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction;
-import org.apache.ignite.cluster.ClusterNode;
-import org.apache.ignite.configuration.CacheConfiguration;
-import org.apache.ignite.configuration.NearCacheConfiguration;
-import org.apache.ignite.internal.IgniteInternalFuture;
-import org.apache.ignite.internal.processors.cache.GridCacheAbstractSelfTest;
-import org.apache.ignite.internal.util.typedef.internal.U;
-import org.apache.ignite.testframework.GridTestUtils;
-
-import static org.apache.ignite.cache.CacheMode.PARTITIONED;
-
-/**
- *
- */
-public class GridCacheSynchronousEvictionsFailoverSelfTest extends GridCacheAbstractSelfTest {
- /** {@inheritDoc} */
- @Override protected void beforeTest() throws Exception {
- fail("https://issues.apache.org/jira/browse/IGNITE-804");
- }
-
- /** {@inheritDoc} */
- @Override protected int gridCount() {
- return 3;
- }
-
- /** {@inheritDoc} */
- @Override protected CacheMode cacheMode() {
- return PARTITIONED;
- }
-
- /** {@inheritDoc} */
- @Override protected NearCacheConfiguration nearConfiguration() {
- return null;
- }
-
- /** {@inheritDoc} */
- @Override protected CacheConfiguration cacheConfiguration(String igniteInstanceName) throws Exception {
- CacheConfiguration ccfg = super.cacheConfiguration(igniteInstanceName);
-
- ccfg.setEvictSynchronized(true);
- ccfg.setEvictSynchronizedKeyBufferSize(10);
-
- ccfg.setBackups(2);
-
- ccfg.setAffinity(new RendezvousAffinityFunction(false, 500));
-
- return ccfg;
- }
-
- /** {@inheritDoc} */
- @Override protected long getTestTimeout() {
- return 60_000;
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testSynchronousEvictions() throws Exception {
- IgniteCache<String, Integer> cache = jcache(0);
-
- final AtomicBoolean stop = new AtomicBoolean();
-
- IgniteInternalFuture<?> fut = null;
-
- try {
- Map<String, Integer> data = new HashMap<>();
-
- addKeysForNode(affinity(cache), grid(0).localNode(), data);
- addKeysForNode(affinity(cache), grid(1).localNode(), data);
- addKeysForNode(affinity(cache), grid(2).localNode(), data);
-
- fut = GridTestUtils.runAsync(new Callable<Void>() {
- @Override public Void call() throws Exception {
- Random rnd = new Random();
-
- while (!stop.get()) {
- int idx = rnd.nextBoolean() ? 1 : 2;
-
- log.info("Stopping grid: " + idx);
-
- stopGrid(idx);
-
- U.sleep(100);
-
- log.info("Starting grid: " + idx);
-
- startGrid(idx);
- }
-
- return null;
- }
- });
-
- for (int i = 0 ; i < 100; i++) {
- log.info("Iteration: " + i);
-
- try {
- cache.putAll(data);
- }
- catch (IgniteException ignore) {
- continue;
- }
-
- cache.localEvict(data.keySet());
- }
- }
- finally {
- stop.set(true);
-
- if (fut != null)
- fut.get();
- }
- }
-
- /**
- * @param aff Cache affinity.
- * @param node Primary node for keys.
- * @param data Map where keys/values should be put to.
- */
- private void addKeysForNode(Affinity<String> aff, ClusterNode node, Map<String, Integer> data) {
- int cntr = 0;
-
- for (int i = 0; i < 100_000; i++) {
- String key = String.valueOf(i);
-
- if (aff.isPrimary(node, key)) {
- data.put(key, i);
-
- cntr++;
-
- if (cntr == 500)
- break;
- }
- }
-
- assertEquals(500, cntr);
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/lru/LruNearEvictionPolicySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/lru/LruNearEvictionPolicySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/lru/LruNearEvictionPolicySelfTest.java
index ed7f918..0eb7a42 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/lru/LruNearEvictionPolicySelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/lru/LruNearEvictionPolicySelfTest.java
@@ -21,7 +21,6 @@ import java.util.Random;
import org.apache.ignite.IgniteCache;
import org.apache.ignite.IgniteDataStreamer;
import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMemoryMode;
import org.apache.ignite.cache.eviction.lru.LruEvictionPolicy;
import org.apache.ignite.configuration.CacheConfiguration;
import org.apache.ignite.configuration.IgniteConfiguration;
@@ -33,7 +32,6 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
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.CacheRebalanceMode.SYNC;
import static org.apache.ignite.cache.CacheWriteSynchronizationMode.PRIMARY_SYNC;
@@ -54,9 +52,6 @@ public class LruNearEvictionPolicySelfTest extends GridCommonAbstractTest {
/** Cache atomicity mode specified by test. */
private CacheAtomicityMode atomicityMode;
- /** Memory mode. */
- private CacheMemoryMode memMode;
-
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration c = super.getConfiguration(igniteInstanceName);
@@ -65,7 +60,6 @@ public class LruNearEvictionPolicySelfTest extends GridCommonAbstractTest {
cc.setCacheMode(PARTITIONED);
cc.setAtomicityMode(atomicityMode);
- cc.setMemoryMode(memMode);
cc.setWriteSynchronizationMode(PRIMARY_SYNC);
cc.setRebalanceMode(SYNC);
cc.setStartSize(100);
@@ -95,17 +89,6 @@ public class LruNearEvictionPolicySelfTest extends GridCommonAbstractTest {
*/
public void testAtomicNearEvictionMaxSize() throws Exception {
atomicityMode = ATOMIC;
- memMode = ONHEAP_TIERED;
-
- checkNearEvictionMaxSize();
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testAtomicOffHeapNearEvictionMaxSize() throws Exception {
- atomicityMode = ATOMIC;
- memMode = CacheMemoryMode.OFFHEAP_TIERED;
checkNearEvictionMaxSize();
}
@@ -115,17 +98,6 @@ public class LruNearEvictionPolicySelfTest extends GridCommonAbstractTest {
*/
public void testTransactionalNearEvictionMaxSize() throws Exception {
atomicityMode = TRANSACTIONAL;
- memMode = ONHEAP_TIERED;
-
- checkNearEvictionMaxSize();
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testTransactionalOffHeapNearEvictionMaxSize() throws Exception {
- atomicityMode = TRANSACTIONAL;
- memMode = CacheMemoryMode.OFFHEAP_TIERED;
checkNearEvictionMaxSize();
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/lru/LruNearOnlyNearEvictionPolicySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/lru/LruNearOnlyNearEvictionPolicySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/lru/LruNearOnlyNearEvictionPolicySelfTest.java
index 1f6ce65..5b0a12c 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/lru/LruNearOnlyNearEvictionPolicySelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/lru/LruNearOnlyNearEvictionPolicySelfTest.java
@@ -20,7 +20,6 @@ package org.apache.ignite.internal.processors.cache.eviction.lru;
import org.apache.ignite.IgniteCache;
import org.apache.ignite.IgniteDataStreamer;
import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMemoryMode;
import org.apache.ignite.cache.CacheMode;
import org.apache.ignite.cache.eviction.lru.LruEvictionPolicy;
import org.apache.ignite.configuration.CacheConfiguration;
@@ -33,8 +32,6 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
-import static org.apache.ignite.cache.CacheMemoryMode.ONHEAP_TIERED;
import static org.apache.ignite.cache.CacheMode.PARTITIONED;
import static org.apache.ignite.cache.CacheMode.REPLICATED;
import static org.apache.ignite.cache.CacheRebalanceMode.SYNC;
@@ -62,9 +59,6 @@ public class LruNearOnlyNearEvictionPolicySelfTest extends GridCommonAbstractTes
/** Cache atomicity mode specified by test. */
private CacheAtomicityMode atomicityMode;
- /** Memory mode. */
- private CacheMemoryMode memMode;
-
/** {@inheritDoc} */
@Override protected void beforeTest() throws Exception {
super.beforeTest();
@@ -83,7 +77,6 @@ public class LruNearOnlyNearEvictionPolicySelfTest extends GridCommonAbstractTes
cc.setCacheMode(cacheMode);
cc.setAtomicityMode(atomicityMode);
- cc.setMemoryMode(memMode);
cc.setWriteSynchronizationMode(PRIMARY_SYNC);
cc.setRebalanceMode(SYNC);
cc.setStartSize(100);
@@ -105,18 +98,6 @@ public class LruNearOnlyNearEvictionPolicySelfTest extends GridCommonAbstractTes
public void testPartitionedAtomicNearEvictionMaxSize() throws Exception {
atomicityMode = ATOMIC;
cacheMode = PARTITIONED;
- memMode = ONHEAP_TIERED;
-
- checkNearEvictionMaxSize();
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testPartitionedAtomicOffHeapNearEvictionMaxSize() throws Exception {
- atomicityMode = ATOMIC;
- cacheMode = PARTITIONED;
- memMode = OFFHEAP_TIERED;
checkNearEvictionMaxSize();
}
@@ -127,18 +108,6 @@ public class LruNearOnlyNearEvictionPolicySelfTest extends GridCommonAbstractTes
public void testPartitionedTransactionalNearEvictionMaxSize() throws Exception {
atomicityMode = TRANSACTIONAL;
cacheMode = PARTITIONED;
- memMode = ONHEAP_TIERED;
-
- checkNearEvictionMaxSize();
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testPartitionedTransactionalOffHeapNearEvictionMaxSize() throws Exception {
- atomicityMode = TRANSACTIONAL;
- cacheMode = PARTITIONED;
- memMode = OFFHEAP_TIERED;
checkNearEvictionMaxSize();
}
@@ -149,18 +118,6 @@ public class LruNearOnlyNearEvictionPolicySelfTest extends GridCommonAbstractTes
public void testReplicatedAtomicNearEvictionMaxSize() throws Exception {
atomicityMode = ATOMIC;
cacheMode = REPLICATED;
- memMode = ONHEAP_TIERED;
-
- checkNearEvictionMaxSize();
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testReplicatedAtomicOffHeapNearEvictionMaxSize() throws Exception {
- atomicityMode = ATOMIC;
- cacheMode = REPLICATED;
- memMode = OFFHEAP_TIERED;
checkNearEvictionMaxSize();
}
@@ -171,18 +128,6 @@ public class LruNearOnlyNearEvictionPolicySelfTest extends GridCommonAbstractTes
public void testReplicatedTransactionalNearEvictionMaxSize() throws Exception {
atomicityMode = TRANSACTIONAL;
cacheMode = REPLICATED;
- memMode = ONHEAP_TIERED;
-
- checkNearEvictionMaxSize();
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testReplicatedTransactionalOffHeapNearEvictionMaxSize() throws Exception {
- atomicityMode = TRANSACTIONAL;
- cacheMode = REPLICATED;
- memMode = OFFHEAP_TIERED;
checkNearEvictionMaxSize();
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/sorted/SortedEvictionPolicyPerformanceTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/sorted/SortedEvictionPolicyPerformanceTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/sorted/SortedEvictionPolicyPerformanceTest.java
index de41691..a3a61a2 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/sorted/SortedEvictionPolicyPerformanceTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/sorted/SortedEvictionPolicyPerformanceTest.java
@@ -80,7 +80,7 @@ public class SortedEvictionPolicyPerformanceTest extends GridCommonAbstractTest
plc.setMaxSize(MAX_SIZE);
ccfg.setEvictionPolicy(plc);
- ccfg.setEvictSynchronized(false);
+ ccfg.setOnheapCacheEnabled(true);
cfg.setPeerClassLoadingEnabled(false);
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheAtomicLocalOffheapExpiryPolicyTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheAtomicLocalOffheapExpiryPolicyTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheAtomicLocalOffheapExpiryPolicyTest.java
deleted file mode 100644
index 24a7478..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheAtomicLocalOffheapExpiryPolicyTest.java
+++ /dev/null
@@ -1,30 +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.expiry;
-
-import org.apache.ignite.cache.CacheMemoryMode;
-
-/**
- *
- */
-public class IgniteCacheAtomicLocalOffheapExpiryPolicyTest extends IgniteCacheAtomicLocalExpiryPolicyTest {
- /** {@inheritDoc} */
- @Override protected CacheMemoryMode memoryMode() {
- return CacheMemoryMode.OFFHEAP_TIERED;
- }
-}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheAtomicLocalOnheapExpiryPolicyTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheAtomicLocalOnheapExpiryPolicyTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheAtomicLocalOnheapExpiryPolicyTest.java
new file mode 100644
index 0000000..af178e5
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheAtomicLocalOnheapExpiryPolicyTest.java
@@ -0,0 +1,26 @@
+/*
+ * 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.expiry;
+
+public class IgniteCacheAtomicLocalOnheapExpiryPolicyTest extends IgniteCacheAtomicLocalExpiryPolicyTest {
+ /** {@inheritDoc} */
+ @Override protected boolean onheapCacheEnabled() {
+ return true;
+ }
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheAtomicOffheapExpiryPolicyTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheAtomicOffheapExpiryPolicyTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheAtomicOffheapExpiryPolicyTest.java
deleted file mode 100644
index 45a0183..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheAtomicOffheapExpiryPolicyTest.java
+++ /dev/null
@@ -1,30 +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.expiry;
-
-import org.apache.ignite.cache.CacheMemoryMode;
-
-/**
- *
- */
-public class IgniteCacheAtomicOffheapExpiryPolicyTest extends IgniteCacheAtomicExpiryPolicyTest {
- /** {@inheritDoc} */
- @Override protected CacheMemoryMode memoryMode() {
- return CacheMemoryMode.OFFHEAP_TIERED;
- }
-}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheAtomicOnheapExpiryPolicyTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheAtomicOnheapExpiryPolicyTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheAtomicOnheapExpiryPolicyTest.java
new file mode 100644
index 0000000..f71a4e3
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheAtomicOnheapExpiryPolicyTest.java
@@ -0,0 +1,26 @@
+/*
+ * 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.expiry;
+
+public class IgniteCacheAtomicOnheapExpiryPolicyTest extends IgniteCacheAtomicExpiryPolicyTest {
+ /** {@inheritDoc} */
+ @Override protected boolean onheapCacheEnabled() {
+ return true;
+ }
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheAtomicPrimaryWriteOrderOffheapExpiryPolicyTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheAtomicPrimaryWriteOrderOffheapExpiryPolicyTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheAtomicPrimaryWriteOrderOffheapExpiryPolicyTest.java
deleted file mode 100644
index 594a6d9..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheAtomicPrimaryWriteOrderOffheapExpiryPolicyTest.java
+++ /dev/null
@@ -1,31 +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.expiry;
-
-import org.apache.ignite.cache.CacheMemoryMode;
-
-/**
- *
- */
-public class IgniteCacheAtomicPrimaryWriteOrderOffheapExpiryPolicyTest extends
- IgniteCacheAtomicPrimaryWriteOrderExpiryPolicyTest {
- /** {@inheritDoc} */
- @Override protected CacheMemoryMode memoryMode() {
- return CacheMemoryMode.OFFHEAP_TIERED;
- }
-}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheAtomicPrimaryWriteOrderWithStoreOffheapExpiryPolicyTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheAtomicPrimaryWriteOrderWithStoreOffheapExpiryPolicyTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheAtomicPrimaryWriteOrderWithStoreOffheapExpiryPolicyTest.java
deleted file mode 100644
index 51d8ba2..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheAtomicPrimaryWriteOrderWithStoreOffheapExpiryPolicyTest.java
+++ /dev/null
@@ -1,31 +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.expiry;
-
-import org.apache.ignite.cache.CacheMemoryMode;
-
-/**
- *
- */
-public class IgniteCacheAtomicPrimaryWriteOrderWithStoreOffheapExpiryPolicyTest extends
- IgniteCacheAtomicPrimaryWriteOrderWithStoreExpiryPolicyTest {
- /** {@inheritDoc} */
- @Override protected CacheMemoryMode memoryMode() {
- return CacheMemoryMode.OFFHEAP_TIERED;
- }
-}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheAtomicReplicatedOffheapExpiryPolicyTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheAtomicReplicatedOffheapExpiryPolicyTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheAtomicReplicatedOffheapExpiryPolicyTest.java
deleted file mode 100644
index a65e155..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheAtomicReplicatedOffheapExpiryPolicyTest.java
+++ /dev/null
@@ -1,30 +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.expiry;
-
-import org.apache.ignite.cache.CacheMemoryMode;
-
-/**
- *
- */
-public class IgniteCacheAtomicReplicatedOffheapExpiryPolicyTest extends IgniteCacheAtomicReplicatedExpiryPolicyTest {
- /** {@inheritDoc} */
- @Override protected CacheMemoryMode memoryMode() {
- return CacheMemoryMode.OFFHEAP_TIERED;
- }
-}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheAtomicWithStoreOffheapExpiryPolicyTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheAtomicWithStoreOffheapExpiryPolicyTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheAtomicWithStoreOffheapExpiryPolicyTest.java
deleted file mode 100644
index ffb170b..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheAtomicWithStoreOffheapExpiryPolicyTest.java
+++ /dev/null
@@ -1,30 +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.expiry;
-
-import org.apache.ignite.cache.CacheMemoryMode;
-
-/**
- *
- */
-public class IgniteCacheAtomicWithStoreOffheapExpiryPolicyTest extends IgniteCacheAtomicWithStoreExpiryPolicyTest {
- /** {@inheritDoc} */
- @Override protected CacheMemoryMode memoryMode() {
- return CacheMemoryMode.OFFHEAP_TIERED;
- }
-}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheExpiryPolicyAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheExpiryPolicyAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheExpiryPolicyAbstractTest.java
index e7a76db..a40c555 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheExpiryPolicyAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheExpiryPolicyAbstractTest.java
@@ -38,7 +38,6 @@ import javax.cache.processor.EntryProcessor;
import javax.cache.processor.MutableEntry;
import org.apache.ignite.Ignite;
import org.apache.ignite.IgniteCache;
-import org.apache.ignite.cache.CacheMemoryMode;
import org.apache.ignite.cache.CachePeekMode;
import org.apache.ignite.cluster.ClusterNode;
import org.apache.ignite.configuration.CacheConfiguration;
@@ -110,11 +109,6 @@ public abstract class IgniteCacheExpiryPolicyAbstractTest extends IgniteCacheAbs
cfg.setExpiryPolicyFactory(factory);
- cfg.setMemoryMode(memoryMode());
-
- if (memoryMode() == CacheMemoryMode.OFFHEAP_TIERED)
- cfg.setOffHeapMaxMemory(0);
-
if (disableEagerTtl)
cfg.setEagerTtl(false);
@@ -122,13 +116,6 @@ public abstract class IgniteCacheExpiryPolicyAbstractTest extends IgniteCacheAbs
}
/**
- * @return Cache memory mode.
- */
- protected CacheMemoryMode memoryMode() {
- return CacheMemoryMode.ONHEAP_TIERED;
- }
-
- /**
* @throws Exception if failed.
*/
public void testCreateUpdate0() throws Exception {
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheExpiryPolicyTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheExpiryPolicyTestSuite.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheExpiryPolicyTestSuite.java
index faa0cd5..58a8fdd 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheExpiryPolicyTestSuite.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheExpiryPolicyTestSuite.java
@@ -48,19 +48,6 @@ public class IgniteCacheExpiryPolicyTestSuite extends TestSuite {
suite.addTestSuite(IgniteCacheTxWithStoreExpiryPolicyTest.class);
suite.addTestSuite(IgniteCacheTxReplicatedExpiryPolicyTest.class);
- // Offheap tests.
- suite.addTestSuite(IgniteCacheAtomicLocalOffheapExpiryPolicyTest.class);
- suite.addTestSuite(IgniteCacheAtomicOffheapExpiryPolicyTest.class);
- suite.addTestSuite(IgniteCacheAtomicWithStoreOffheapExpiryPolicyTest.class);
- suite.addTestSuite(IgniteCacheAtomicPrimaryWriteOrderOffheapExpiryPolicyTest.class);
- suite.addTestSuite(IgniteCacheAtomicPrimaryWriteOrderWithStoreOffheapExpiryPolicyTest.class);
- suite.addTestSuite(IgniteCacheAtomicReplicatedOffheapExpiryPolicyTest.class);
-
- suite.addTestSuite(IgniteCacheTxLocalOffheapExpiryPolicyTest.class);
- suite.addTestSuite(IgniteCacheTxOffheapExpiryPolicyTest.class);
- suite.addTestSuite(IgniteCacheTxWithStoreOffheapExpiryPolicyTest.class);
- suite.addTestSuite(IgniteCacheTxReplicatedOffheapExpiryPolicyTest.class);
-
suite.addTestSuite(IgniteCacheAtomicExpiryPolicyWithStoreTest.class);
suite.addTestSuite(IgniteCacheTxExpiryPolicyWithStoreTest.class);
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheTxLocalOffheapExpiryPolicyTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheTxLocalOffheapExpiryPolicyTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheTxLocalOffheapExpiryPolicyTest.java
deleted file mode 100644
index 60fa556..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheTxLocalOffheapExpiryPolicyTest.java
+++ /dev/null
@@ -1,30 +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.expiry;
-
-import org.apache.ignite.cache.CacheMemoryMode;
-
-/**
- *
- */
-public class IgniteCacheTxLocalOffheapExpiryPolicyTest extends IgniteCacheTxLocalExpiryPolicyTest {
- /** {@inheritDoc} */
- @Override protected CacheMemoryMode memoryMode() {
- return CacheMemoryMode.OFFHEAP_TIERED;
- }
-}
[06/17] ignite git commit: IGNITE-4535 - Add option to store
deserialized values on-heap
Posted by ag...@apache.org.
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/GridCacheSwapScanQueryAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/GridCacheSwapScanQueryAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/GridCacheSwapScanQueryAbstractSelfTest.java
deleted file mode 100644
index 17632de..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/GridCacheSwapScanQueryAbstractSelfTest.java
+++ /dev/null
@@ -1,450 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.internal.processors.cache.query;
-
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.Callable;
-import javax.cache.Cache;
-import org.apache.ignite.IgniteCache;
-import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.affinity.Affinity;
-import org.apache.ignite.cache.query.ScanQuery;
-import org.apache.ignite.configuration.CacheConfiguration;
-import org.apache.ignite.configuration.IgniteConfiguration;
-import org.apache.ignite.lang.IgniteBiPredicate;
-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 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.OFFHEAP_TIERED;
-import static org.apache.ignite.cache.CacheMode.PARTITIONED;
-import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
-
-/**
- * Tests scan query over entries in offheap and swap.
- */
-public abstract class GridCacheSwapScanQueryAbstractSelfTest extends GridCommonAbstractTest {
- /** */
- private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true);
-
- /** */
- protected static final String ATOMIC_PERSON_CACHE_NAME = "atomicPerson";
-
- /** */
- protected static final String ATOMIC_PRIMITIVE_CACHE_NAME = "atomicPrimitive";
-
- /** */
- protected static final String ATOMIC_BYTREARR_CACHE_NAME = "atomicByteArr";
-
- /** */
- protected static final String TRANSACTIONAL_PERSON_CACHE_NAME = "transactionalPerson";
-
- /** */
- protected static final String TRANSACTIONAL_PRIMITIVE_CACHE_NAME = "transactionalPrimitive";
-
- /** */
- protected static final String TRANSACTIONAL_BYTEARR_CACHE_NAME = "transactionalByteArr";
-
- /** {@inheritDoc} */
- @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
- IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
-
- TcpDiscoverySpi disco = new TcpDiscoverySpi();
-
- disco.setIpFinder(ipFinder);
-
- cfg.setDiscoverySpi(disco);
-
- cfg.setCacheConfiguration(
- cacheConfiguration(ATOMIC_PERSON_CACHE_NAME, ATOMIC, Key.class, Person.class),
- cacheConfiguration(TRANSACTIONAL_PERSON_CACHE_NAME, TRANSACTIONAL, Key.class, Person.class),
- cacheConfiguration(ATOMIC_PRIMITIVE_CACHE_NAME, ATOMIC, String.class, Long.class),
- cacheConfiguration(TRANSACTIONAL_PRIMITIVE_CACHE_NAME, TRANSACTIONAL, String.class, Long.class),
- cacheConfiguration(ATOMIC_BYTREARR_CACHE_NAME, ATOMIC, Integer.class, byte[].class),
- cacheConfiguration(TRANSACTIONAL_BYTEARR_CACHE_NAME, TRANSACTIONAL, Integer.class, byte[].class));
-
- return cfg;
- }
-
- /**
- * @param name Name.
- * @param atomicityMode Atomicity mode.
- * @param clsK Class k.
- * @param clsV Class v.
- * @return Cache configuration.
- */
- protected CacheConfiguration cacheConfiguration(String name, CacheAtomicityMode atomicityMode,
- Class<?> clsK, Class<?> clsV) {
- CacheConfiguration ccfg = new CacheConfiguration();
-
- ccfg.setName(name);
-
- ccfg.setMemoryMode(OFFHEAP_TIERED);
-
- ccfg.setOffHeapMaxMemory(1024); // Set small offheap size to provoke eviction in swap.
-
- ccfg.setCacheMode(PARTITIONED);
-
- ccfg.setAtomicityMode(atomicityMode);
-
- ccfg.setAtomicWriteOrderMode(PRIMARY);
-
- ccfg.setWriteSynchronizationMode(FULL_SYNC);
-
- ccfg.setIndexedTypes(clsK, clsV);
-
- return ccfg;
- }
-
- /** {@inheritDoc} */
- @Override protected void beforeTestsStarted() throws Exception {
- startGrids(4);
-
- awaitPartitionMapExchange();
- }
-
- /** {@inheritDoc} */
- @Override protected void afterTestsStopped() throws Exception {
- stopAllGrids();
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testQuery() throws Exception {
- checkQuery(grid(0).cache(ATOMIC_PERSON_CACHE_NAME), false);
-
- checkQuery(grid(0).cache(TRANSACTIONAL_PERSON_CACHE_NAME), false);
-
- checkQuery(grid(0).cache(ATOMIC_PERSON_CACHE_NAME), true);
-
- checkQuery(grid(0).cache(TRANSACTIONAL_PERSON_CACHE_NAME), true);
- }
-
- /**
- * @param cache Cache.
- * @param scanPartitions Scan partitions.
- * @throws Exception If failed.
- */
- @SuppressWarnings("unchecked")
- private void checkQuery(IgniteCache cache, boolean scanPartitions) throws Exception {
- final int ENTRY_CNT = 500;
-
- Map<Integer, Map<Key, Person>> entries = new HashMap<>();
-
- Affinity<Object> aff = ignite(0).affinity(cache.getName());
-
- for (int i = 0; i < ENTRY_CNT; i++) {
- Key key = new Key(i);
- Person val = new Person("p-" + i, i);
-
- int part = aff.partition(key);
-
- cache.getAndPut(key, val);
-
- Map<Key, Person> partEntries = entries.get(part);
-
- if (partEntries == null)
- entries.put(part, partEntries = new HashMap<>());
-
- partEntries.put(key, val);
- }
-
- try {
- int partitions = scanPartitions ? aff.partitions() : 1;
-
- for (int i = 0; i < partitions; i++) {
- ScanQuery<Key, Person> qry = new ScanQuery<>(new IgniteBiPredicate<Key, Person>() {
- @Override public boolean apply(Key key, Person p) {
- assertEquals(key.id, (Integer)p.salary);
-
- return key.id % 2 == 0;
- }
- });
-
- if (scanPartitions)
- qry.setPartition(i);
-
- List<Cache.Entry<Key, Person>> res = cache.query(qry).getAll();
-
- if (!scanPartitions)
- assertEquals(ENTRY_CNT / 2, res.size());
-
- for (Cache.Entry<Key, Person> e : res) {
- Key k = e.getKey();
- Person p = e.getValue();
-
- assertEquals(k.id, (Integer)p.salary);
- assertEquals(0, k.id % 2);
-
- if (scanPartitions) {
- Map<Key, Person> partEntries = entries.get(i);
-
- assertEquals(p, partEntries.get(k));
- }
- }
-
- qry = new ScanQuery<>();
-
- if (scanPartitions)
- qry.setPartition(i);
-
- res = cache.query(qry).getAll();
-
- if (!scanPartitions)
- assertEquals(ENTRY_CNT, res.size());
- }
-
- testMultithreaded(cache, ENTRY_CNT / 2);
- }
- finally {
- for (int i = 0; i < ENTRY_CNT; i++)
- assertTrue(cache.remove(new Key(i)));
- }
- }
-
- /**
- * @param cache Cache.
- * @param expCnt Expected entries in query result.
- * @throws Exception If failed.
- */
- private void testMultithreaded(final IgniteCache cache, final int expCnt) throws Exception {
- log.info("Starting multithreaded queries.");
-
- GridTestUtils.runMultiThreaded(new Callable<Void>() {
- @SuppressWarnings("unchecked")
- @Override public Void call() throws Exception {
- ScanQuery<Key, Person> qry = new ScanQuery<>(new IgniteBiPredicate<Key, Person>() {
- @Override public boolean apply(Key key, Person p) {
- assertEquals(key.id, (Integer)p.salary);
-
- return key.id % 2 == 0;
- }
- });
-
- for (int i = 0; i < 250; i++) {
- List<Cache.Entry<Key, Person>> res = cache.query(qry).getAll();
-
- assertEquals(expCnt, res.size());
-
- if (i % 50 == 0)
- log.info("Iteration " + i);
- }
-
- return null;
- }
- }, 8, "test");
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testQueryPrimitives() throws Exception {
- checkQueryPrimitives(grid(0).cache(ATOMIC_PRIMITIVE_CACHE_NAME));
- checkQueryPrimitives(grid(0).cache(TRANSACTIONAL_PRIMITIVE_CACHE_NAME));
- }
-
- /**
- * @param cache Cache.
- * @throws Exception If failed.
- */
- @SuppressWarnings("unchecked")
- private void checkQueryPrimitives(IgniteCache cache) throws Exception {
- final int ENTRY_CNT = 500;
-
- for (int i = 0; i < ENTRY_CNT; i++)
- cache.getAndPut(String.valueOf(i), (long)i);
-
- try {
- ScanQuery<String, Long> qry = new ScanQuery<>(new IgniteBiPredicate<String, Long>() {
- @Override public boolean apply(String key, Long val) {
- assertEquals(key, String.valueOf(val));
-
- return val % 2 == 0;
- }
- });
-
- Collection<Cache.Entry<String, Long>> res = cache.query(qry).getAll();
-
- assertEquals(ENTRY_CNT / 2, res.size());
-
- for (Cache.Entry<String, Long> e : res) {
- String key = e.getKey();
- Long val = e.getValue();
-
- assertEquals(key, String.valueOf(val));
-
- assertEquals(0, val % 2);
- }
-
- qry = new ScanQuery<>();
-
- res = cache.query(qry).getAll();
-
- assertEquals(ENTRY_CNT, res.size());
- }
- finally {
- for (int i = 0; i < ENTRY_CNT; i++)
- assertTrue(cache.remove(String.valueOf(i)));
- }
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testQueryValueByteArray() throws Exception {
- checkQueryValueByteArray(grid(0).cache(ATOMIC_BYTREARR_CACHE_NAME));
- checkQueryValueByteArray(grid(0).cache(TRANSACTIONAL_BYTEARR_CACHE_NAME));
- }
-
- /**
- * @param cache Cache.
- * @throws Exception If failed.
- */
- @SuppressWarnings("unchecked")
- private void checkQueryValueByteArray(IgniteCache cache) throws Exception {
- final int ENTRY_CNT = 100;
-
- for (int i = 0; i < ENTRY_CNT; i++)
- cache.getAndPut(i, new byte[i]);
-
- try {
- ScanQuery<Integer, byte[]> qry = new ScanQuery<>(
- new IgniteBiPredicate<Integer, byte[]>() {
- @Override public boolean apply(Integer key, byte[] val) {
- assertEquals(key, (Integer)val.length);
-
- return key % 2 == 0;
- }
- });
-
- Collection<Cache.Entry<Integer, byte[]>> res = cache.query(qry).getAll();
-
- assertEquals(ENTRY_CNT / 2, res.size());
-
- for (Cache.Entry<Integer, byte[]> e : res) {
- Integer key = e.getKey();
- byte[] val = e.getValue();
-
- assertEquals(key, (Integer)val.length);
-
- assertEquals(0, key % 2);
- }
-
- qry = new ScanQuery<>();
-
- res = cache.query(qry).getAll();
-
- assertEquals(ENTRY_CNT, res.size());
- }
- finally {
- for (int i = 0; i < ENTRY_CNT; i++)
- assertTrue(cache.remove(i));
- }
- }
-
- /**
- *
- */
- @SuppressWarnings("PublicInnerClass")
- public static class Key {
- /** */
- @SuppressWarnings("PublicField")
- public Integer id;
-
- /**
- * @param id ID.
- */
- public Key(Integer id) {
- this.id = id;
- }
-
- /** {@inheritDoc} */
- @Override public boolean equals(Object o) {
- if (this == o)
- return true;
-
- if (o == null || getClass() != o.getClass())
- return false;
-
- Key key = (Key)o;
-
- return id.equals(key.id);
- }
-
- /** {@inheritDoc} */
- @Override public int hashCode() {
- return id.hashCode();
- }
- }
-
- /**
- *
- */
- @SuppressWarnings("PublicInnerClass")
- public static class Person {
- /** */
- @SuppressWarnings("PublicField")
- public String name;
-
- /** */
- @SuppressWarnings("PublicField")
- public int salary;
-
- /**
- * @param name Name.
- * @param salary Salary.
- */
- public Person(String name, int salary) {
- this.name = name;
- this.salary = salary;
- }
-
- /** {@inheritDoc} */
- @Override public boolean equals(Object o) {
- if (this == o)
- return true;
-
- if (o == null || getClass() != o.getClass())
- return false;
-
- Person person = (Person)o;
-
- if (salary != person.salary)
- return false;
-
- return !(name != null ? !name.equals(person.name) : person.name != null);
-
- }
-
- /** {@inheritDoc} */
- @Override public int hashCode() {
- int res = name != null ? name.hashCode() : 0;
-
- return 31 * res + salary;
- }
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/GridCacheSwapScanQuerySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/GridCacheSwapScanQuerySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/GridCacheSwapScanQuerySelfTest.java
deleted file mode 100644
index 1e21f0c..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/GridCacheSwapScanQuerySelfTest.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.internal.processors.cache.query;
-
-/**
- *
- */
-public class GridCacheSwapScanQuerySelfTest extends GridCacheSwapScanQueryAbstractSelfTest {
- // No-op.
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/IgniteCacheQueryCacheDestroySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/IgniteCacheQueryCacheDestroySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/IgniteCacheQueryCacheDestroySelfTest.java
index dc104ff..dea491c 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/IgniteCacheQueryCacheDestroySelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/IgniteCacheQueryCacheDestroySelfTest.java
@@ -25,7 +25,6 @@ import javax.cache.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.cache.CacheRebalanceMode;
import org.apache.ignite.cache.CacheWriteSynchronizationMode;
@@ -129,7 +128,6 @@ public class IgniteCacheQueryCacheDestroySelfTest extends GridCommonAbstractTest
cfg.setAtomicityMode(CacheAtomicityMode.ATOMIC)
.setCacheMode(CacheMode.PARTITIONED)
- .setMemoryMode(CacheMemoryMode.OFFHEAP_TIERED)
.setRebalanceMode(CacheRebalanceMode.SYNC)
.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC)
.setRebalanceThrottle(100)
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousBatchAckTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousBatchAckTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousBatchAckTest.java
index f7ceeb8..612043f 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousBatchAckTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousBatchAckTest.java
@@ -24,7 +24,6 @@ import javax.cache.event.CacheEntryListenerException;
import javax.cache.event.CacheEntryUpdatedListener;
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.query.ContinuousQuery;
import org.apache.ignite.cache.query.QueryCursor;
@@ -45,8 +44,6 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
-import static org.apache.ignite.cache.CacheMemoryMode.ONHEAP_TIERED;
import static org.apache.ignite.cache.CacheMode.PARTITIONED;
import static org.apache.ignite.cache.CacheMode.REPLICATED;
import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
@@ -128,7 +125,7 @@ public class CacheContinuousBatchAckTest extends GridCommonAbstractTest implemen
* @throws Exception If failed.
*/
public void testPartition() throws Exception {
- checkBackupAcknowledgeMessage(cacheConfiguration(PARTITIONED, 1, ATOMIC, ONHEAP_TIERED, false));
+ checkBackupAcknowledgeMessage(cacheConfiguration(PARTITIONED, 1, ATOMIC, false));
}
/**
@@ -137,21 +134,21 @@ public class CacheContinuousBatchAckTest extends GridCommonAbstractTest implemen
public void testPartitionWithFilter() throws Exception {
filterOn.set(true);
- checkBackupAcknowledgeMessage(cacheConfiguration(PARTITIONED, 1, ATOMIC, ONHEAP_TIERED, true));
+ checkBackupAcknowledgeMessage(cacheConfiguration(PARTITIONED, 1, ATOMIC, true));
}
/**
* @throws Exception If failed.
*/
public void testPartitionNoBackups() throws Exception {
- checkBackupAcknowledgeMessage(cacheConfiguration(PARTITIONED, 0, ATOMIC, ONHEAP_TIERED, false));
+ checkBackupAcknowledgeMessage(cacheConfiguration(PARTITIONED, 0, ATOMIC, false));
}
/**
* @throws Exception If failed.
*/
public void testPartitionTx() throws Exception {
- checkBackupAcknowledgeMessage(cacheConfiguration(PARTITIONED, 1, TRANSACTIONAL, ONHEAP_TIERED, false));
+ checkBackupAcknowledgeMessage(cacheConfiguration(PARTITIONED, 1, TRANSACTIONAL, false));
}
/**
@@ -160,14 +157,14 @@ public class CacheContinuousBatchAckTest extends GridCommonAbstractTest implemen
public void testPartitionTxWithFilter() throws Exception {
filterOn.set(true);
- checkBackupAcknowledgeMessage(cacheConfiguration(PARTITIONED, 1, TRANSACTIONAL, ONHEAP_TIERED, true));
+ checkBackupAcknowledgeMessage(cacheConfiguration(PARTITIONED, 1, TRANSACTIONAL, true));
}
/**
* @throws Exception If failed.
*/
public void testPartitionTxNoBackup() throws Exception {
- checkBackupAcknowledgeMessage(cacheConfiguration(PARTITIONED, 0, TRANSACTIONAL, ONHEAP_TIERED, false));
+ checkBackupAcknowledgeMessage(cacheConfiguration(PARTITIONED, 0, TRANSACTIONAL, false));
}
/**
@@ -176,44 +173,21 @@ public class CacheContinuousBatchAckTest extends GridCommonAbstractTest implemen
public void testPartitionTxNoBackupWithFilter() throws Exception {
filterOn.set(true);
- checkBackupAcknowledgeMessage(cacheConfiguration(PARTITIONED, 0, TRANSACTIONAL, ONHEAP_TIERED, true));
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testPartitionOffheap() throws Exception {
- checkBackupAcknowledgeMessage(cacheConfiguration(PARTITIONED, 1, ATOMIC, OFFHEAP_TIERED, false));
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testPartitionOffheapWithFilter() throws Exception {
- filterOn.set(true);
-
- checkBackupAcknowledgeMessage(cacheConfiguration(PARTITIONED, 1, ATOMIC, OFFHEAP_TIERED, true));
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testPartitionTxOffheap() throws Exception {
- checkBackupAcknowledgeMessage(cacheConfiguration(PARTITIONED, 1, TRANSACTIONAL, OFFHEAP_TIERED, false));
+ checkBackupAcknowledgeMessage(cacheConfiguration(PARTITIONED, 0, TRANSACTIONAL, true));
}
/**
* @throws Exception If failed.
*/
public void testReplicated() throws Exception {
- checkBackupAcknowledgeMessage(cacheConfiguration(REPLICATED, 1, ATOMIC, ONHEAP_TIERED, false));
+ checkBackupAcknowledgeMessage(cacheConfiguration(REPLICATED, 1, ATOMIC, false));
}
/**
* @throws Exception If failed.
*/
public void testReplicatedTx() throws Exception {
- checkBackupAcknowledgeMessage(cacheConfiguration(REPLICATED, 1, TRANSACTIONAL, ONHEAP_TIERED, false));
+ checkBackupAcknowledgeMessage(cacheConfiguration(REPLICATED, 1, TRANSACTIONAL, false));
}
/**
@@ -222,30 +196,7 @@ public class CacheContinuousBatchAckTest extends GridCommonAbstractTest implemen
public void testReplicatedTxWithFilter() throws Exception {
filterOn.set(true);
- checkBackupAcknowledgeMessage(cacheConfiguration(REPLICATED, 1, TRANSACTIONAL, ONHEAP_TIERED, true));
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testReplicatedOffheap() throws Exception {
- checkBackupAcknowledgeMessage(cacheConfiguration(REPLICATED, 1, ATOMIC, OFFHEAP_TIERED, false));
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testReplicatedTxOffheap() throws Exception {
- checkBackupAcknowledgeMessage(cacheConfiguration(REPLICATED, 1, TRANSACTIONAL, OFFHEAP_TIERED, false));
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testReplicatedTxOffheapWithFilter() throws Exception {
- filterOn.set(true);
-
- checkBackupAcknowledgeMessage(cacheConfiguration(REPLICATED, 1, TRANSACTIONAL, OFFHEAP_TIERED, true));
+ checkBackupAcknowledgeMessage(cacheConfiguration(REPLICATED, 1, TRANSACTIONAL, true));
}
/**
@@ -293,7 +244,6 @@ public class CacheContinuousBatchAckTest extends GridCommonAbstractTest implemen
* @param cacheMode Cache mode.
* @param backups Number of backups.
* @param atomicityMode Cache atomicity mode.
- * @param memoryMode Cache memory mode.
* @param filter Filter enabled.
* @return Cache configuration.
*/
@@ -301,12 +251,11 @@ public class CacheContinuousBatchAckTest extends GridCommonAbstractTest implemen
CacheMode cacheMode,
int backups,
CacheAtomicityMode atomicityMode,
- CacheMemoryMode memoryMode, boolean filter) {
+ boolean filter) {
CacheConfiguration<Object, Object> ccfg = new CacheConfiguration<>();
ccfg.setAtomicityMode(atomicityMode);
ccfg.setCacheMode(cacheMode);
- ccfg.setMemoryMode(memoryMode);
ccfg.setWriteSynchronizationMode(FULL_SYNC);
if (cacheMode == PARTITIONED)
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryAsyncFilterListenerTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryAsyncFilterListenerTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryAsyncFilterListenerTest.java
index 4f398a6..22b8653 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryAsyncFilterListenerTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryAsyncFilterListenerTest.java
@@ -35,7 +35,6 @@ import org.apache.ignite.IgniteException;
import org.apache.ignite.cache.CacheAtomicityMode;
import org.apache.ignite.cache.CacheEntryEventSerializableFilter;
import org.apache.ignite.cache.CacheEntryProcessor;
-import org.apache.ignite.cache.CacheMemoryMode;
import org.apache.ignite.cache.CacheMode;
import org.apache.ignite.cache.affinity.Affinity;
import org.apache.ignite.cache.query.ContinuousQuery;
@@ -59,9 +58,6 @@ import static java.util.concurrent.TimeUnit.SECONDS;
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.OFFHEAP_TIERED;
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_VALUES;
-import static org.apache.ignite.cache.CacheMemoryMode.ONHEAP_TIERED;
import static org.apache.ignite.cache.CacheMode.PARTITIONED;
import static org.apache.ignite.cache.CacheMode.REPLICATED;
import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
@@ -126,119 +122,84 @@ public class CacheContinuousQueryAsyncFilterListenerTest extends GridCommonAbstr
* @throws Exception If failed.
*/
public void testNonDeadLockInListenerTx() throws Exception {
- testNonDeadLockInListener(cacheConfiguration(PARTITIONED, 2, TRANSACTIONAL, ONHEAP_TIERED), true, true, false);
+ testNonDeadLockInListener(cacheConfiguration(PARTITIONED, 2, TRANSACTIONAL), true, true, false);
}
/**
* @throws Exception If failed.
*/
public void testNonDeadLockInListenerTxJCacheApi() throws Exception {
- testNonDeadLockInListener(cacheConfiguration(PARTITIONED, 2, TRANSACTIONAL, ONHEAP_TIERED), true, true, true);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testNonDeadLockInListenerTxOffHeap() throws Exception {
- testNonDeadLockInListener(cacheConfiguration(PARTITIONED, 2, TRANSACTIONAL, OFFHEAP_TIERED), true, true, false);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testNonDeadLockInListenerTxOffHeapJCacheApi() throws Exception {
- testNonDeadLockInListener(cacheConfiguration(PARTITIONED, 2, TRANSACTIONAL, OFFHEAP_TIERED), true, true, true);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testNonDeadLockInListenerTxOffHeapValues() throws Exception {
- testNonDeadLockInListener(cacheConfiguration(PARTITIONED, 2, TRANSACTIONAL, OFFHEAP_VALUES), true, true, false);
+ testNonDeadLockInListener(cacheConfiguration(PARTITIONED, 2, TRANSACTIONAL), true, true, true);
}
/**
* @throws Exception If failed.
*/
public void testNonDeadLockInListenerAtomic() throws Exception {
- testNonDeadLockInListener(cacheConfiguration(PARTITIONED, 2, ATOMIC, ONHEAP_TIERED), true, true, false);
+ testNonDeadLockInListener(cacheConfiguration(PARTITIONED, 2, ATOMIC), true, true, false);
}
/**
* @throws Exception If failed.
*/
public void testNonDeadLockInListenerAtomicJCacheApi() throws Exception {
- testNonDeadLockInListener(cacheConfiguration(PARTITIONED, 2, ATOMIC, ONHEAP_TIERED), true, true, true);
+ testNonDeadLockInListener(cacheConfiguration(PARTITIONED, 2, ATOMIC), true, true, true);
}
/**
* @throws Exception If failed.
*/
public void testNonDeadLockInListenerReplicatedAtomic() throws Exception {
- testNonDeadLockInListener(cacheConfiguration(REPLICATED, 2, ATOMIC, ONHEAP_TIERED), true, true, false);
+ testNonDeadLockInListener(cacheConfiguration(REPLICATED, 2, ATOMIC), true, true, false);
}
/**
* @throws Exception If failed.
*/
public void testNonDeadLockInListenerReplicatedAtomicJCacheApi() throws Exception {
- testNonDeadLockInListener(cacheConfiguration(REPLICATED, 2, ATOMIC, ONHEAP_TIERED), true, true, true);
+ testNonDeadLockInListener(cacheConfiguration(REPLICATED, 2, ATOMIC), true, true, true);
}
/**
* @throws Exception If failed.
*/
public void testNonDeadLockInListenerReplicatedAtomicOffHeapValues() throws Exception {
- testNonDeadLockInListener(cacheConfiguration(REPLICATED, 2, ATOMIC, ONHEAP_TIERED), true, true, false);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testNonDeadLockInListenerAtomicOffHeap() throws Exception {
- testNonDeadLockInListener(cacheConfiguration(PARTITIONED, 2, ATOMIC, OFFHEAP_TIERED), true, true, false);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testNonDeadLockInListenerAtomicOffHeapValues() throws Exception {
- testNonDeadLockInListener(cacheConfiguration(PARTITIONED, 2, ATOMIC, OFFHEAP_TIERED), true, true, false);
+ testNonDeadLockInListener(cacheConfiguration(REPLICATED, 2, ATOMIC), true, true, false);
}
/**
* @throws Exception If failed.
*/
public void testNonDeadLockInListenerAtomicWithoutBackup() throws Exception {
- testNonDeadLockInListener(cacheConfiguration(PARTITIONED, 0, ATOMIC, ONHEAP_TIERED), true, true, false);
+ testNonDeadLockInListener(cacheConfiguration(PARTITIONED, 0, ATOMIC), true, true, false);
}
/**
* @throws Exception If failed.
*/
public void testNonDeadLockInListenerAtomicWithoutBackupJCacheApi() throws Exception {
- testNonDeadLockInListener(cacheConfiguration(PARTITIONED, 0, ATOMIC, ONHEAP_TIERED), true, true, true);
+ testNonDeadLockInListener(cacheConfiguration(PARTITIONED, 0, ATOMIC), true, true, true);
}
/**
* @throws Exception If failed.
*/
public void testNonDeadLockInListener() throws Exception {
- testNonDeadLockInListener(cacheConfiguration(PARTITIONED, 2, TRANSACTIONAL, ONHEAP_TIERED), true, true, false);
+ testNonDeadLockInListener(cacheConfiguration(PARTITIONED, 2, TRANSACTIONAL), true, true, false);
}
/**
* @throws Exception If failed.
*/
public void testNonDeadLockInListenerReplicated() throws Exception {
- testNonDeadLockInListener(cacheConfiguration(REPLICATED, 2, TRANSACTIONAL, ONHEAP_TIERED), true, true, false);
+ testNonDeadLockInListener(cacheConfiguration(REPLICATED, 2, TRANSACTIONAL), true, true, false);
}
/**
* @throws Exception If failed.
*/
public void testNonDeadLockInListenerReplicatedJCacheApi() throws Exception {
- testNonDeadLockInListener(cacheConfiguration(REPLICATED, 2, TRANSACTIONAL, ONHEAP_TIERED), true, true, true);
+ testNonDeadLockInListener(cacheConfiguration(REPLICATED, 2, TRANSACTIONAL), true, true, true);
}
///
@@ -249,105 +210,63 @@ public class CacheContinuousQueryAsyncFilterListenerTest extends GridCommonAbstr
* @throws Exception If failed.
*/
public void testNonDeadLockInFilterTx() throws Exception {
- testNonDeadLockInFilter(cacheConfiguration(PARTITIONED, 2, TRANSACTIONAL, ONHEAP_TIERED), true, true, false);
+ testNonDeadLockInFilter(cacheConfiguration(PARTITIONED, 2, TRANSACTIONAL), true, true, false);
}
/**
* @throws Exception If failed.
*/
public void testNonDeadLockInFilterTxJCacheApi() throws Exception {
- testNonDeadLockInFilter(cacheConfiguration(PARTITIONED, 2, TRANSACTIONAL, ONHEAP_TIERED), true, true, true);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testNonDeadLockInFilterTxOffHeap() throws Exception {
- testNonDeadLockInFilter(cacheConfiguration(PARTITIONED, 2, TRANSACTIONAL, OFFHEAP_TIERED), true, true, false);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testNonDeadLockInFilterTxOffHeapJCacheApi() throws Exception {
- testNonDeadLockInFilter(cacheConfiguration(PARTITIONED, 2, TRANSACTIONAL, OFFHEAP_TIERED), true, true, true);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testNonDeadLockInFilterTxOffHeapValues() throws Exception {
- testNonDeadLockInFilter(cacheConfiguration(PARTITIONED, 2, TRANSACTIONAL, OFFHEAP_VALUES), true, true, false);
+ testNonDeadLockInFilter(cacheConfiguration(PARTITIONED, 2, TRANSACTIONAL), true, true, true);
}
/**
* @throws Exception If failed.
*/
public void testNonDeadLockInFilterAtomic() throws Exception {
- testNonDeadLockInFilter(cacheConfiguration(PARTITIONED, 2, ATOMIC, ONHEAP_TIERED), true, true, false);
+ testNonDeadLockInFilter(cacheConfiguration(PARTITIONED, 2, ATOMIC), true, true, false);
}
/**
* @throws Exception If failed.
*/
public void testNonDeadLockInFilterAtomicJCacheApi() throws Exception {
- testNonDeadLockInFilter(cacheConfiguration(PARTITIONED, 2, ATOMIC, ONHEAP_TIERED), true, true, true);
+ testNonDeadLockInFilter(cacheConfiguration(PARTITIONED, 2, ATOMIC), true, true, true);
}
/**
* @throws Exception If failed.
*/
public void testNonDeadLockInFilterReplicatedAtomic() throws Exception {
- testNonDeadLockInFilter(cacheConfiguration(REPLICATED, 2, ATOMIC, ONHEAP_TIERED), true, true, false);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testNonDeadLockInFilterAtomicOffHeap() throws Exception {
- testNonDeadLockInFilter(cacheConfiguration(PARTITIONED, 2, ATOMIC, OFFHEAP_TIERED), true, true, false);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testNonDeadLockInFilterAtomicOffHeapJCacheApi() throws Exception {
- testNonDeadLockInFilter(cacheConfiguration(PARTITIONED, 2, ATOMIC, OFFHEAP_TIERED), true, true, true);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testNonDeadLockInFilterAtomicOffHeapValues() throws Exception {
- testNonDeadLockInFilter(cacheConfiguration(PARTITIONED, 2, ATOMIC, OFFHEAP_TIERED), true, true, false);
+ testNonDeadLockInFilter(cacheConfiguration(REPLICATED, 2, ATOMIC), true, true, false);
}
/**
* @throws Exception If failed.
*/
public void testNonDeadLockInFilterAtomicWithoutBackup() throws Exception {
- testNonDeadLockInFilter(cacheConfiguration(PARTITIONED, 0, ATOMIC, ONHEAP_TIERED), true, true, false);
+ testNonDeadLockInFilter(cacheConfiguration(PARTITIONED, 0, ATOMIC), true, true, false);
}
/**
* @throws Exception If failed.
*/
public void testNonDeadLockInFilter() throws Exception {
- testNonDeadLockInFilter(cacheConfiguration(PARTITIONED, 2, TRANSACTIONAL, ONHEAP_TIERED), true, true, false);
+ testNonDeadLockInFilter(cacheConfiguration(PARTITIONED, 2, TRANSACTIONAL), true, true, false);
}
/**
* @throws Exception If failed.
*/
public void testNonDeadLockInFilterReplicated() throws Exception {
- testNonDeadLockInFilter(cacheConfiguration(REPLICATED, 2, TRANSACTIONAL, ONHEAP_TIERED), true, true, false);
+ testNonDeadLockInFilter(cacheConfiguration(REPLICATED, 2, TRANSACTIONAL), true, true, false);
}
/**
* @throws Exception If failed.
*/
public void testNonDeadLockInFilterReplicatedJCacheApi() throws Exception {
- testNonDeadLockInFilter(cacheConfiguration(REPLICATED, 2, TRANSACTIONAL, ONHEAP_TIERED), true, true, false);
+ testNonDeadLockInFilter(cacheConfiguration(REPLICATED, 2, TRANSACTIONAL), true, true, false);
}
///
@@ -358,70 +277,42 @@ public class CacheContinuousQueryAsyncFilterListenerTest extends GridCommonAbstr
* @throws Exception If failed.
*/
public void testNonDeadLockInFilterTxSyncFilter() throws Exception {
- testNonDeadLockInListener(cacheConfiguration(PARTITIONED, 2, TRANSACTIONAL, ONHEAP_TIERED), false, true, false);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testNonDeadLockInFilterTxOffHeapSyncFilter() throws Exception {
- testNonDeadLockInListener(cacheConfiguration(PARTITIONED, 2, TRANSACTIONAL, OFFHEAP_TIERED), false, true, false);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testNonDeadLockInFilterTxOffHeapValuesSyncFilter() throws Exception {
- testNonDeadLockInListener(cacheConfiguration(PARTITIONED, 2, TRANSACTIONAL, OFFHEAP_VALUES), false, true, false);
+ testNonDeadLockInListener(cacheConfiguration(PARTITIONED, 2, TRANSACTIONAL), false, true, false);
}
/**
* @throws Exception If failed.
*/
public void testNonDeadLockInFilterAtomicSyncFilter() throws Exception {
- testNonDeadLockInListener(cacheConfiguration(PARTITIONED, 2, ATOMIC, ONHEAP_TIERED), false, true, false);
+ testNonDeadLockInListener(cacheConfiguration(PARTITIONED, 2, ATOMIC), false, true, false);
}
/**
* @throws Exception If failed.
*/
public void testNonDeadLockInFilterReplicatedAtomicSyncFilter() throws Exception {
- testNonDeadLockInListener(cacheConfiguration(REPLICATED, 2, ATOMIC, ONHEAP_TIERED), false, true, false);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testNonDeadLockInFilterAtomicOffHeapSyncFilter() throws Exception {
- testNonDeadLockInListener(cacheConfiguration(PARTITIONED, 2, ATOMIC, OFFHEAP_TIERED), false, true, false);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testNonDeadLockInFilterAtomicOffHeapValuesSyncFilter() throws Exception {
- testNonDeadLockInListener(cacheConfiguration(PARTITIONED, 2, ATOMIC, OFFHEAP_TIERED), false, true, false);
+ testNonDeadLockInListener(cacheConfiguration(REPLICATED, 2, ATOMIC), false, true, false);
}
/**
* @throws Exception If failed.
*/
public void testNonDeadLockInFilterAtomicWithoutBackupSyncFilter() throws Exception {
- testNonDeadLockInListener(cacheConfiguration(PARTITIONED, 0, ATOMIC, ONHEAP_TIERED), false, true, false);
+ testNonDeadLockInListener(cacheConfiguration(PARTITIONED, 0, ATOMIC), false, true, false);
}
/**
* @throws Exception If failed.
*/
public void testNonDeadLockInFilterSyncFilter() throws Exception {
- testNonDeadLockInListener(cacheConfiguration(PARTITIONED, 2, TRANSACTIONAL, ONHEAP_TIERED), false, true, false);
+ testNonDeadLockInListener(cacheConfiguration(PARTITIONED, 2, TRANSACTIONAL), false, true, false);
}
/**
* @throws Exception If failed.
*/
public void testNonDeadLockInFilterReplicatedSyncFilter() throws Exception {
- testNonDeadLockInListener(cacheConfiguration(REPLICATED, 2, TRANSACTIONAL, ONHEAP_TIERED), false, true, false);
+ testNonDeadLockInListener(cacheConfiguration(REPLICATED, 2, TRANSACTIONAL), false, true, false);
}
/**
@@ -872,20 +763,17 @@ public class CacheContinuousQueryAsyncFilterListenerTest extends GridCommonAbstr
* @param cacheMode Cache mode.
* @param backups Number of backups.
* @param atomicityMode Cache atomicity mode.
- * @param memoryMode Cache memory mode.
* @return Cache configuration.
*/
protected CacheConfiguration<Object, Object> cacheConfiguration(
CacheMode cacheMode,
int backups,
- CacheAtomicityMode atomicityMode,
- CacheMemoryMode memoryMode) {
+ CacheAtomicityMode atomicityMode) {
CacheConfiguration<Object, Object> ccfg = new CacheConfiguration<>();
- ccfg.setName("test-cache-" + atomicityMode + "-" + cacheMode + "-" + memoryMode + "-" + backups);
+ ccfg.setName("test-cache-" + atomicityMode + "-" + cacheMode + "-" + backups);
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/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryExecuteInPrimaryTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryExecuteInPrimaryTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryExecuteInPrimaryTest.java
index 1d014ca..bcc58c0 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryExecuteInPrimaryTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryExecuteInPrimaryTest.java
@@ -24,7 +24,6 @@ import org.apache.ignite.Ignite;
import org.apache.ignite.IgniteCache;
import org.apache.ignite.cache.CacheAtomicityMode;
import org.apache.ignite.cache.CacheEntryEventSerializableFilter;
-import org.apache.ignite.cache.CacheMemoryMode;
import org.apache.ignite.cache.CacheMode;
import org.apache.ignite.cache.query.ContinuousQuery;
import org.apache.ignite.cache.query.QueryCursor;
@@ -88,7 +87,6 @@ public class CacheContinuousQueryExecuteInPrimaryTest extends GridCommonAbstract
ccfg.setAtomicityMode(cacheAtomicityMode);
ccfg.setCacheMode(cacheMode);
- ccfg.setMemoryMode(CacheMemoryMode.ONHEAP_TIERED);
ccfg.setWriteSynchronizationMode(FULL_SYNC);
ccfg.setAtomicWriteOrderMode(PRIMARY);
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFactoryFilterRandomOperationTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFactoryFilterRandomOperationTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFactoryFilterRandomOperationTest.java
index dbaafe1..8713aaf 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFactoryFilterRandomOperationTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFactoryFilterRandomOperationTest.java
@@ -62,7 +62,6 @@ import static java.util.concurrent.TimeUnit.MILLISECONDS;
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.REPLICATED;
import static org.apache.ignite.internal.processors.cache.query.continuous.CacheContinuousQueryFactoryFilterRandomOperationTest.NonSerializableFilter.isAccepted;
import static org.apache.ignite.internal.processors.cache.query.continuous.CacheContinuousQueryRandomOperationsTest.ContinuousDeploy.CLIENT;
@@ -94,7 +93,6 @@ public class CacheContinuousQueryFactoryFilterRandomOperationTest extends CacheC
CacheConfiguration<Object, Object> ccfg = cacheConfiguration(REPLICATED,
1,
ATOMIC,
- ONHEAP_TIERED,
false);
final IgniteCache<Object, Object> cache = grid(0).createCache(ccfg);
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFailoverAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFailoverAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFailoverAbstractSelfTest.java
index f9130ae..36c777b 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFailoverAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFailoverAbstractSelfTest.java
@@ -57,7 +57,6 @@ import org.apache.ignite.cache.CacheAtomicWriteOrderMode;
import org.apache.ignite.cache.CacheAtomicityMode;
import org.apache.ignite.cache.CacheEntryEventSerializableFilter;
import org.apache.ignite.cache.CacheEntryProcessor;
-import org.apache.ignite.cache.CacheMemoryMode;
import org.apache.ignite.cache.CacheMode;
import org.apache.ignite.cache.CacheRebalanceMode;
import org.apache.ignite.cache.CacheWriteSynchronizationMode;
@@ -108,7 +107,6 @@ import static java.util.concurrent.TimeUnit.MILLISECONDS;
import static java.util.concurrent.TimeUnit.MINUTES;
import static java.util.concurrent.TimeUnit.SECONDS;
import static org.apache.ignite.cache.CacheAtomicWriteOrderMode.PRIMARY;
-import static org.apache.ignite.cache.CacheMemoryMode.ONHEAP_TIERED;
import static org.apache.ignite.cache.CacheMode.REPLICATED;
import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
import static org.apache.ignite.testframework.GridTestUtils.waitForCondition;
@@ -161,7 +159,6 @@ public abstract class CacheContinuousQueryFailoverAbstractSelfTest extends GridC
ccfg.setBackups(backups);
ccfg.setWriteSynchronizationMode(FULL_SYNC);
ccfg.setNearConfiguration(nearCacheConfiguration());
- ccfg.setMemoryMode(memoryMode());
cfg.setCacheConfiguration(ccfg);
@@ -171,13 +168,6 @@ public abstract class CacheContinuousQueryFailoverAbstractSelfTest extends GridC
}
/**
- * @return Cache memory mode.
- */
- protected CacheMemoryMode memoryMode() {
- return ONHEAP_TIERED;
- }
-
- /**
* @return Async callback flag.
*/
protected boolean asyncCallback() {
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFailoverAtomicPrimaryWriteOrderOffheapTieredTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFailoverAtomicPrimaryWriteOrderOffheapTieredTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFailoverAtomicPrimaryWriteOrderOffheapTieredTest.java
deleted file mode 100644
index cc8590d..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFailoverAtomicPrimaryWriteOrderOffheapTieredTest.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.internal.processors.cache.query.continuous;
-
-import org.apache.ignite.cache.CacheMemoryMode;
-
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
-
-/**
- *
- */
-public class CacheContinuousQueryFailoverAtomicPrimaryWriteOrderOffheapTieredTest
- extends CacheContinuousQueryFailoverAtomicPrimaryWriteOrderSelfTest {
- /** {@inheritDoc} */
- @Override protected CacheMemoryMode memoryMode() {
- return OFFHEAP_TIERED;
- }
-}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFailoverTxOffheapTieredTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFailoverTxOffheapTieredTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFailoverTxOffheapTieredTest.java
deleted file mode 100644
index cae06c3..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFailoverTxOffheapTieredTest.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.internal.processors.cache.query.continuous;
-
-import org.apache.ignite.cache.CacheMemoryMode;
-
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
-
-/**
- *
- */
-public class CacheContinuousQueryFailoverTxOffheapTieredTest extends CacheContinuousQueryFailoverTxSelfTest {
- /** {@inheritDoc} */
- @Override protected CacheMemoryMode memoryMode() {
- return OFFHEAP_TIERED;
- }
-}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryOperationP2PTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryOperationP2PTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryOperationP2PTest.java
index 43bf54f..4fa0424 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryOperationP2PTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryOperationP2PTest.java
@@ -30,7 +30,6 @@ import javax.cache.event.CacheEntryListenerException;
import javax.cache.event.CacheEntryUpdatedListener;
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.query.ContinuousQuery;
import org.apache.ignite.cache.query.QueryCursor;
@@ -44,7 +43,6 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
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.CacheMode.REPLICATED;
import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
@@ -105,8 +103,7 @@ public class CacheContinuousQueryOperationP2PTest extends GridCommonAbstractTest
public void testAtomicClient() throws Exception {
CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
1,
- ATOMIC,
- ONHEAP_TIERED
+ ATOMIC
);
testContinuousQuery(ccfg, true);
@@ -118,8 +115,7 @@ public class CacheContinuousQueryOperationP2PTest extends GridCommonAbstractTest
public void testAtomic() throws Exception {
CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
1,
- ATOMIC,
- ONHEAP_TIERED
+ ATOMIC
);
testContinuousQuery(ccfg, false);
@@ -131,8 +127,7 @@ public class CacheContinuousQueryOperationP2PTest extends GridCommonAbstractTest
public void testAtomicReplicated() throws Exception {
CacheConfiguration<Object, Object> ccfg = cacheConfiguration(REPLICATED,
0,
- ATOMIC,
- ONHEAP_TIERED
+ ATOMIC
);
testContinuousQuery(ccfg, false);
@@ -144,8 +139,7 @@ public class CacheContinuousQueryOperationP2PTest extends GridCommonAbstractTest
public void testAtomicReplicatedClient() throws Exception {
CacheConfiguration<Object, Object> ccfg = cacheConfiguration(REPLICATED,
0,
- ATOMIC,
- ONHEAP_TIERED
+ ATOMIC
);
testContinuousQuery(ccfg, true);
@@ -157,8 +151,7 @@ public class CacheContinuousQueryOperationP2PTest extends GridCommonAbstractTest
public void testTx() throws Exception {
CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
1,
- TRANSACTIONAL,
- ONHEAP_TIERED
+ TRANSACTIONAL
);
testContinuousQuery(ccfg, false);
@@ -169,8 +162,7 @@ public class CacheContinuousQueryOperationP2PTest extends GridCommonAbstractTest
public void testTxClient() throws Exception {
CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
1,
- TRANSACTIONAL,
- ONHEAP_TIERED
+ TRANSACTIONAL
);
testContinuousQuery(ccfg, true);
@@ -182,8 +174,7 @@ public class CacheContinuousQueryOperationP2PTest extends GridCommonAbstractTest
public void testTxReplicated() throws Exception {
CacheConfiguration<Object, Object> ccfg = cacheConfiguration(REPLICATED,
0,
- TRANSACTIONAL,
- ONHEAP_TIERED
+ TRANSACTIONAL
);
testContinuousQuery(ccfg, false);
@@ -195,8 +186,7 @@ public class CacheContinuousQueryOperationP2PTest extends GridCommonAbstractTest
public void testTxReplicatedClient() throws Exception {
CacheConfiguration<Object, Object> ccfg = cacheConfiguration(REPLICATED,
0,
- TRANSACTIONAL,
- ONHEAP_TIERED
+ TRANSACTIONAL
);
testContinuousQuery(ccfg, true);
@@ -279,19 +269,16 @@ public class CacheContinuousQueryOperationP2PTest extends GridCommonAbstractTest
* @param cacheMode Cache mode.
* @param backups Number of backups.
* @param atomicityMode Cache atomicity mode.
- * @param memoryMode Cache memory mode.
* @return Cache configuration.
*/
private CacheConfiguration<Object, Object> cacheConfiguration(
CacheMode cacheMode,
int backups,
- CacheAtomicityMode atomicityMode,
- CacheMemoryMode memoryMode) {
+ CacheAtomicityMode atomicityMode) {
CacheConfiguration<Object, Object> 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/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryOrderingEventTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryOrderingEventTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryOrderingEventTest.java
index c5c98cb..9f5cfd5 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryOrderingEventTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryOrderingEventTest.java
@@ -39,7 +39,6 @@ import org.apache.ignite.IgniteCache;
import org.apache.ignite.cache.CacheAtomicityMode;
import org.apache.ignite.cache.CacheEntryEventSerializableFilter;
import org.apache.ignite.cache.CacheEntryProcessor;
-import org.apache.ignite.cache.CacheMemoryMode;
import org.apache.ignite.cache.CacheMode;
import org.apache.ignite.cache.CacheWriteSynchronizationMode;
import org.apache.ignite.cache.query.ContinuousQuery;
@@ -64,9 +63,6 @@ import org.apache.ignite.transactions.Transaction;
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.OFFHEAP_TIERED;
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_VALUES;
-import static org.apache.ignite.cache.CacheMemoryMode.ONHEAP_TIERED;
import static org.apache.ignite.cache.CacheMode.PARTITIONED;
import static org.apache.ignite.cache.CacheMode.REPLICATED;
import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
@@ -143,38 +139,7 @@ public class CacheContinuousQueryOrderingEventTest extends GridCommonAbstractTes
* @throws Exception If failed.
*/
public void testAtomicOnheapTwoBackup() throws Exception {
- CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED, 2, ATOMIC,
- ONHEAP_TIERED, PRIMARY_SYNC);
-
- doOrderingTest(ccfg, false);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testAtomicOffheapTwoBackup() throws Exception {
- CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED, 2, ATOMIC,
- OFFHEAP_TIERED, PRIMARY_SYNC);
-
- doOrderingTest(ccfg, false);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testAtomicOffheapValuesTwoBackup() throws Exception {
- CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED, 2, ATOMIC,
- OFFHEAP_VALUES, PRIMARY_SYNC);
-
- doOrderingTest(ccfg, false);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testAtomicReplicatedOffheap() throws Exception {
- CacheConfiguration<Object, Object> ccfg = cacheConfiguration(REPLICATED, 0, ATOMIC,
- OFFHEAP_TIERED, PRIMARY_SYNC);
+ CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED, 2, ATOMIC, PRIMARY_SYNC);
doOrderingTest(ccfg, false);
}
@@ -183,8 +148,7 @@ public class CacheContinuousQueryOrderingEventTest extends GridCommonAbstractTes
* @throws Exception If failed.
*/
public void testTxOnheapTwoBackup() throws Exception {
- CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED, 2, TRANSACTIONAL,
- ONHEAP_TIERED, FULL_SYNC);
+ CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED, 2, TRANSACTIONAL, FULL_SYNC);
doOrderingTest(ccfg, false);
}
@@ -193,8 +157,7 @@ public class CacheContinuousQueryOrderingEventTest extends GridCommonAbstractTes
* @throws Exception If failed.
*/
public void testTxOnheapWithoutBackup() throws Exception {
- CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED, 0, TRANSACTIONAL,
- ONHEAP_TIERED, PRIMARY_SYNC);
+ CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED, 0, TRANSACTIONAL, PRIMARY_SYNC);
doOrderingTest(ccfg, false);
}
@@ -203,8 +166,7 @@ public class CacheContinuousQueryOrderingEventTest extends GridCommonAbstractTes
* @throws Exception If failed.
*/
public void testTxOnheapWithoutBackupFullSync() throws Exception {
- CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED, 0, TRANSACTIONAL,
- ONHEAP_TIERED, FULL_SYNC);
+ CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED, 0, TRANSACTIONAL, FULL_SYNC);
doOrderingTest(ccfg, false);
}
@@ -215,8 +177,7 @@ public class CacheContinuousQueryOrderingEventTest extends GridCommonAbstractTes
* @throws Exception If failed.
*/
public void testAtomicOnheapTwoBackupAsync() throws Exception {
- CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED, 2, ATOMIC,
- ONHEAP_TIERED, PRIMARY_SYNC);
+ CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED, 2, ATOMIC, PRIMARY_SYNC);
doOrderingTest(ccfg, true);
}
@@ -225,48 +186,7 @@ public class CacheContinuousQueryOrderingEventTest extends GridCommonAbstractTes
* @throws Exception If failed.
*/
public void testAtomicOnheapTwoBackupAsyncFullSync() throws Exception {
- CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED, 2, ATOMIC,
- ONHEAP_TIERED, FULL_SYNC);
-
- doOrderingTest(ccfg, true);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testAtomicOffheapTwoBackupAsync() throws Exception {
- CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED, 2, ATOMIC,
- OFFHEAP_TIERED, PRIMARY_SYNC);
-
- doOrderingTest(ccfg, true);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testAtomicOffheapTwoBackupAsyncFullSync() throws Exception {
- CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED, 2, ATOMIC,
- OFFHEAP_TIERED, FULL_SYNC);
-
- doOrderingTest(ccfg, true);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testAtomicOffheapValuesTwoBackupAsync() throws Exception {
- CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED, 2, ATOMIC,
- OFFHEAP_VALUES, PRIMARY_SYNC);
-
- doOrderingTest(ccfg, true);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testAtomicOffheapValuesTwoBackupAsyncFullSync() throws Exception {
- CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED, 2, ATOMIC,
- OFFHEAP_VALUES, FULL_SYNC);
+ CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED, 2, ATOMIC, FULL_SYNC);
doOrderingTest(ccfg, true);
}
@@ -275,8 +195,7 @@ public class CacheContinuousQueryOrderingEventTest extends GridCommonAbstractTes
* @throws Exception If failed.
*/
public void testAtomicReplicatedAsync() throws Exception {
- CacheConfiguration<Object, Object> ccfg = cacheConfiguration(REPLICATED, 0, ATOMIC,
- ONHEAP_TIERED, PRIMARY_SYNC);
+ CacheConfiguration<Object, Object> ccfg = cacheConfiguration(REPLICATED, 0, ATOMIC, PRIMARY_SYNC);
doOrderingTest(ccfg, true);
}
@@ -285,18 +204,7 @@ public class CacheContinuousQueryOrderingEventTest extends GridCommonAbstractTes
* @throws Exception If failed.
*/
public void testAtomicReplicatedAsyncFullSync() throws Exception {
- CacheConfiguration<Object, Object> ccfg = cacheConfiguration(REPLICATED, 0, ATOMIC,
- ONHEAP_TIERED, FULL_SYNC);
-
- doOrderingTest(ccfg, true);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testAtomicReplicatedOffheapAsync() throws Exception {
- CacheConfiguration<Object, Object> ccfg = cacheConfiguration(REPLICATED, 0, ATOMIC,
- OFFHEAP_TIERED, PRIMARY_SYNC);
+ CacheConfiguration<Object, Object> ccfg = cacheConfiguration(REPLICATED, 0, ATOMIC, FULL_SYNC);
doOrderingTest(ccfg, true);
}
@@ -305,8 +213,7 @@ public class CacheContinuousQueryOrderingEventTest extends GridCommonAbstractTes
* @throws Exception If failed.
*/
public void testAtomicOnheapWithoutBackupAsync() throws Exception {
- CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED, 0, ATOMIC,
- ONHEAP_TIERED, PRIMARY_SYNC);
+ CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED, 0, ATOMIC, PRIMARY_SYNC);
doOrderingTest(ccfg, true);
}
@@ -315,8 +222,7 @@ public class CacheContinuousQueryOrderingEventTest extends GridCommonAbstractTes
* @throws Exception If failed.
*/
public void testTxOnheapTwoBackupAsync() throws Exception {
- CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED, 2, TRANSACTIONAL,
- ONHEAP_TIERED, PRIMARY_SYNC);
+ CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED, 2, TRANSACTIONAL, PRIMARY_SYNC);
doOrderingTest(ccfg, true);
}
@@ -325,8 +231,7 @@ public class CacheContinuousQueryOrderingEventTest extends GridCommonAbstractTes
* @throws Exception If failed.
*/
public void testTxOnheapAsync() throws Exception {
- CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED, 0, TRANSACTIONAL,
- ONHEAP_TIERED, PRIMARY_SYNC);
+ CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED, 0, TRANSACTIONAL, PRIMARY_SYNC);
doOrderingTest(ccfg, true);
}
@@ -335,8 +240,7 @@ public class CacheContinuousQueryOrderingEventTest extends GridCommonAbstractTes
* @throws Exception If failed.
*/
public void testTxOnheapAsyncFullSync() throws Exception {
- CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED, 0, TRANSACTIONAL,
- ONHEAP_TIERED, FULL_SYNC);
+ CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED, 0, TRANSACTIONAL, FULL_SYNC);
doOrderingTest(ccfg, true);
}
@@ -604,7 +508,6 @@ public class CacheContinuousQueryOrderingEventTest extends GridCommonAbstractTes
* @param cacheMode Cache mode.
* @param backups Number of backups.
* @param atomicityMode Cache atomicity mode.
- * @param memoryMode Cache memory mode.
* @param writeMode Cache write mode.
* @return Cache configuration.
*/
@@ -612,15 +515,13 @@ public class CacheContinuousQueryOrderingEventTest extends GridCommonAbstractTes
CacheMode cacheMode,
int backups,
CacheAtomicityMode atomicityMode,
- CacheMemoryMode memoryMode,
CacheWriteSynchronizationMode writeMode) {
CacheConfiguration<Object, Object> ccfg = new CacheConfiguration<>();
- ccfg.setName("test-cache-" + atomicityMode + "-" + cacheMode + "-" + memoryMode + "-" + memoryMode + "-"
- + backups + "-" + UUID.randomUUID()); // TODO GG-11220 (remove setName when fixed).
+ ccfg.setName("test-cache-" + atomicityMode + "-" + cacheMode + "-" + backups + "-" + UUID.randomUUID());
+ // TODO GG-11220 (remove setName when fixed).
ccfg.setAtomicityMode(atomicityMode);
ccfg.setCacheMode(cacheMode);
- ccfg.setMemoryMode(memoryMode);
ccfg.setWriteSynchronizationMode(writeMode);
ccfg.setAtomicWriteOrderMode(PRIMARY);
[15/17] ignite git commit: IGNITE-4535 - Add option to store
deserialized values on-heap
Posted by ag...@apache.org.
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
index 2564787..b81be12 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
@@ -342,11 +342,8 @@ public class GridCacheProcessor extends GridProcessorAdapter {
String msg = "Disable eviction policy (remove from configuration)";
- if (cfg.getEvictionPolicy() != null) {
+ if (cfg.getEvictionPolicy() != null)
perf.add(msg, false);
-
- perf.add("Disable synchronized evictions (set 'evictSynchronized' to false)", !cfg.isEvictSynchronized());
- }
else
perf.add(msg, true);
@@ -514,6 +511,10 @@ public class GridCacheProcessor extends GridProcessorAdapter {
if (cc.getAtomicityMode() == ATOMIC)
assertParameter(cc.getTransactionManagerLookupClassName() == null,
"transaction manager can not be used with ATOMIC cache");
+
+ if (cc.getEvictionPolicy() != null && !cc.isOnheapCacheEnabled())
+ throw new IgniteCheckedException("Onheap cache must be enabled if eviction policy is configured [cacheName="
+ + U.maskName(cc.getName()) + "]");
}
/**
@@ -1476,7 +1477,7 @@ public class GridCacheProcessor extends GridProcessorAdapter {
GridCacheAffinityManager affMgr = new GridCacheAffinityManager();
GridCacheEventManager evtMgr = new GridCacheEventManager();
- CacheEvictionManager evictMgr = nearEnabled ? new GridCacheEvictionManager() : new CacheOffheapEvictionManager();
+ CacheEvictionManager evictMgr = (nearEnabled || cfg.isOnheapCacheEnabled()) ? new GridCacheEvictionManager() : new CacheOffheapEvictionManager();
GridCacheQueryManager qryMgr = queryManager(cfg);
CacheContinuousQueryManager contQryMgr = new CacheContinuousQueryManager();
CacheDataStructuresManager dataStructuresMgr = new CacheDataStructuresManager();
@@ -1623,7 +1624,7 @@ public class GridCacheProcessor extends GridProcessorAdapter {
* 7. GridCacheTtlManager.
* ===============================================
*/
- evictMgr = new CacheOffheapEvictionManager();
+ evictMgr = cfg.isOnheapCacheEnabled() ? new GridCacheEvictionManager() : new CacheOffheapEvictionManager();
evtMgr = new GridCacheEventManager();
pluginMgr = new CachePluginManager(ctx, cfg);
drMgr = pluginMgr.createComponent(GridCacheDrManager.class);
@@ -3332,15 +3333,7 @@ public class GridCacheProcessor extends GridProcessorAdapter {
"Write behind flush thread count", locAttr.writeBehindFlushThreadCount(),
rmtAttr.writeBehindFlushThreadCount(), false);
- CU.checkAttributeMismatch(log, rmtAttr.cacheName(), rmt, "evictMaxOverflowRatio",
- "Eviction max overflow ratio", locAttr.evictMaxOverflowRatio(),
- rmtAttr.evictMaxOverflowRatio(), true);
-
if (locAttr.cacheMode() == PARTITIONED) {
- CU.checkAttributeMismatch(log, rmtAttr.cacheName(), rmt, "evictSynchronized",
- "Eviction synchronized", locAttr.evictSynchronized(), rmtAttr.evictSynchronized(),
- true);
-
CU.checkAttributeMismatch(log, rmtAttr.cacheName(), rmt, "nearEvictionPolicy",
"Near eviction policy", locAttr.nearEvictionPolicyClassName(),
rmtAttr.nearEvictionPolicyClassName(), false);
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
index 823988c..457c895 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
@@ -920,14 +920,6 @@ public class GridCacheUtils {
public static void unwindEvicts(GridCacheContext ctx) {
assert ctx != null;
- ctx.evicts().unwind();
-
- if (ctx.isNear()) {
- GridCacheContext dhtCtx = ctx.near().dht().context();
-
- dhtCtx.evicts().unwind();
- }
-
ctx.ttl().expire();
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridNoStorageCacheMap.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridNoStorageCacheMap.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridNoStorageCacheMap.java
index d49b016..db3533d 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridNoStorageCacheMap.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridNoStorageCacheMap.java
@@ -22,6 +22,7 @@ import java.util.Collections;
import java.util.Set;
import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
import org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtCacheEntry;
+import org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtInvalidPartitionException;
import org.jetbrains.annotations.Nullable;
/**
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/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 9b10d71..ae42784 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
@@ -250,7 +250,7 @@ public class IgniteCacheOffheapManagerImpl extends GridCacheManagerAdapter imple
for (GridDhtLocalPartition locPart : cctx.topology().currentLocalPartitions()) {
if (primary) {
if (cctx.affinity().primaryByPartition(locNode, locPart.id(), topVer)) {
- cnt += locPart.size();
+ cnt += locPart.dataStore().size();
continue;
}
@@ -258,7 +258,7 @@ public class IgniteCacheOffheapManagerImpl extends GridCacheManagerAdapter imple
if (backup) {
if (cctx.affinity().backupByPartition(locNode, locPart.id(), topVer))
- cnt += locPart.size();
+ cnt += locPart.dataStore().size();
}
}
@@ -276,7 +276,7 @@ public class IgniteCacheOffheapManagerImpl extends GridCacheManagerAdapter imple
else {
GridDhtLocalPartition locPart = cctx.topology().localPartition(part, AffinityTopologyVersion.NONE, false);
- return locPart == null ? 0 : locPart.size();
+ return locPart == null ? 0 : locPart.dataStore().size();
}
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/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 942462a..096ca9f 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
@@ -280,6 +280,12 @@ public abstract class GridDistributedCacheAdapter<K, V> extends GridCacheAdapter
if (modes.offheap)
size += offheap.entriesCount(modes.primary, modes.backup, topVer);
+ else if (modes.heap) {
+ for (GridDhtLocalPartition locPart : ctx.topology().currentLocalPartitions()) {
+ if ((modes.primary && locPart.primary(topVer)) || (modes.backup && locPart.backup(topVer)))
+ size += locPart.publicSize();
+ }
+ }
}
return size;
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java
index ac6eee3..7e6ae81 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java
@@ -398,16 +398,6 @@ public abstract class GridDhtCacheAdapter<K, V> extends GridDistributedCacheAdap
*
* @throws GridDhtInvalidPartitionException If partition for the key is no longer valid.
*/
- @Override public GridCacheEntryEx entryEx(KeyCacheObject key, boolean touch)
- throws GridDhtInvalidPartitionException {
- return super.entryEx(key, touch);
- }
-
- /**
- * {@inheritDoc}
- *
- * @throws GridDhtInvalidPartitionException If partition for the key is no longer valid.
- */
@Override public GridCacheEntryEx entryEx(KeyCacheObject key,
AffinityTopologyVersion topVer) throws GridDhtInvalidPartitionException {
return super.entryEx(key, topVer);
@@ -543,7 +533,7 @@ public abstract class GridDhtCacheAdapter<K, V> extends GridDistributedCacheAdap
CacheObject cacheVal = ctx.toCacheObject(val);
- entry = entryEx(key, false);
+ entry = entryEx(key);
entry.initialValue(cacheVal,
ver,
@@ -579,6 +569,21 @@ public abstract class GridDhtCacheAdapter<K, V> extends GridDistributedCacheAdap
}
/** {@inheritDoc} */
+ @Override public int size() {
+ return (int)sizeLong();
+ }
+
+ /** {@inheritDoc} */
+ @Override public long sizeLong() {
+ long sum = 0;
+
+ for (GridDhtLocalPartition p : topology().currentLocalPartitions())
+ sum += p.dataStore().size();
+
+ return sum;
+ }
+
+ /** {@inheritDoc} */
@Override public int primarySize() {
return (int)primarySizeLong();
}
@@ -591,7 +596,7 @@ public abstract class GridDhtCacheAdapter<K, V> extends GridDistributedCacheAdap
for (GridDhtLocalPartition p : topology().currentLocalPartitions()) {
if (p.primary(topVer))
- sum += p.publicSize();
+ sum += p.dataStore().size();
}
return sum;
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java
index e2c05cc..46b2bf8 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java
@@ -78,7 +78,7 @@ import static org.apache.ignite.internal.processors.cache.distributed.dht.GridDh
/**
* Key partition.
*/
-public class GridDhtLocalPartition implements Comparable<GridDhtLocalPartition>, GridReservable, GridCacheConcurrentMap {
+public class GridDhtLocalPartition extends GridCacheConcurrentMapImpl implements Comparable<GridDhtLocalPartition>, GridReservable {
/** Maximum size for delete queue. */
public static final int MAX_DELETE_QUEUE_SIZE = Integer.getInteger(IGNITE_ATOMIC_CACHE_DELETE_HISTORY_SIZE, 200_000);
@@ -109,9 +109,6 @@ public class GridDhtLocalPartition implements Comparable<GridDhtLocalPartition>,
@GridToStringExclude
private final GridFutureAdapter<?> rent;
- /** Entries map. */
- private final GridCacheConcurrentMap map;
-
/** Context. */
private final GridCacheContext cctx;
@@ -151,7 +148,7 @@ public class GridDhtLocalPartition implements Comparable<GridDhtLocalPartition>,
*/
@SuppressWarnings("ExternalizableWithoutPublicNoArgConstructor")
GridDhtLocalPartition(GridCacheContext cctx, int id, GridCacheMapEntryFactory entryFactory) {
- assert cctx != null;
+ super(cctx, entryFactory, cctx.config().getStartSize() / cctx.affinity().partitions());
this.id = id;
this.cctx = cctx;
@@ -160,12 +157,10 @@ public class GridDhtLocalPartition implements Comparable<GridDhtLocalPartition>,
rent = new GridFutureAdapter<Object>() {
@Override public String toString() {
- return "PartitionRentFuture [part=" + GridDhtLocalPartition.this + ", map=" + map + ']';
+ return "PartitionRentFuture [part=" + GridDhtLocalPartition.this + ']';
}
};
- map = new GridCacheConcurrentMapImpl(cctx, entryFactory, cctx.config().getStartSize() / cctx.affinity().partitions());
-
int delQueueSize = CU.isSystemCache(cctx.name()) ? 100 :
Math.max(MAX_DELETE_QUEUE_SIZE / cctx.affinity().partitions(), 20);
@@ -240,20 +235,13 @@ public class GridDhtLocalPartition implements Comparable<GridDhtLocalPartition>,
}
/**
- * @return Keys belonging to partition.
- */
- public Set<KeyCacheObject> keySet() {
- return map.keySet();
- }
-
- /**
* @return {@code True} if partition is empty.
*/
public boolean isEmpty() {
if (cctx.allowFastEviction())
- return map.size() == 0;
+ return size() == 0;
- return size() == 0 && map.size() == 0;
+ return store.size() == 0 && size() == 0;
}
/**
@@ -294,26 +282,6 @@ public class GridDhtLocalPartition implements Comparable<GridDhtLocalPartition>,
}
}
- /** {@inheritDoc} */
- @Override public int size() {
- return (int)store.size();
- }
-
- /** {@inheritDoc} */
- @Override public int publicSize() {
- return (int)store.size();
- }
-
- /** {@inheritDoc} */
- @Override public void incrementPublicSize(GridCacheEntryEx e) {
- map.incrementPublicSize(e);
- }
-
- /** {@inheritDoc} */
- @Override public void decrementPublicSize(GridCacheEntryEx e) {
- map.decrementPublicSize(e);
- }
-
/**
* @return If partition is moving or owning or renting.
*/
@@ -323,52 +291,6 @@ public class GridDhtLocalPartition implements Comparable<GridDhtLocalPartition>,
return state == MOVING || state == OWNING || state == RENTING;
}
- /** {@inheritDoc} */
- @Override @Nullable public GridCacheMapEntry getEntry(KeyCacheObject key) {
- return map.getEntry(key);
- }
-
- /** {@inheritDoc} */
- @Override public boolean removeEntry(GridCacheEntryEx entry) {
- return map.removeEntry(entry);
- }
-
- /** {@inheritDoc} */
- @Override public Iterable<GridCacheMapEntry> entries(
- CacheEntryPredicate... filter) {
- return map.entries(filter);
- }
-
- /** {@inheritDoc} */
- @Override public Iterable<GridCacheMapEntry> allEntries(CacheEntryPredicate... filter) {
- return map.allEntries(filter);
- }
-
- /** {@inheritDoc} */
- @Override public Set<GridCacheMapEntry> entrySet(CacheEntryPredicate... filter) {
- return map.entrySet(filter);
- }
-
- /** {@inheritDoc} */
- @Override @Nullable public GridCacheMapEntry randomEntry() {
- return map.randomEntry();
- }
-
- /** {@inheritDoc} */
- @Override public GridCacheMapEntry putEntryIfObsoleteOrAbsent(
- AffinityTopologyVersion topVer,
- KeyCacheObject key,
- @Nullable CacheObject val,
- boolean create,
- boolean touch) {
- return map.putEntryIfObsoleteOrAbsent(topVer, key, val, create, touch);
- }
-
- /** {@inheritDoc} */
- @Override public Set<KeyCacheObject> keySet(CacheEntryPredicate... filter) {
- return map.keySet(filter);
- }
-
/**
* @param entry Entry to remove.
*/
@@ -376,7 +298,7 @@ public class GridDhtLocalPartition implements Comparable<GridDhtLocalPartition>,
assert entry.obsolete() : entry;
// Make sure to remove exactly this entry.
- map.removeEntry(entry);
+ removeEntry(entry);
// Attempt to evict.
try {
@@ -895,20 +817,20 @@ public class GridDhtLocalPartition implements Comparable<GridDhtLocalPartition>,
boolean rec = cctx.events().isRecordable(EVT_CACHE_REBALANCE_OBJECT_UNLOADED);
- Iterator<GridDhtCacheEntry> it = (Iterator)map.allEntries().iterator();
+ Iterator<GridCacheMapEntry> it = allEntries().iterator();
GridCacheObsoleteEntryExtras extras = new GridCacheObsoleteEntryExtras(clearVer);
while (it.hasNext()) {
- GridDhtCacheEntry cached = null;
+ GridCacheMapEntry cached = null;
cctx.shared().database().checkpointReadLock();
try {
cached = it.next();
- if (cached.clearInternal(clearVer, extras)) {
- map.removeEntry(cached);
+ if (cached instanceof GridDhtCacheEntry && ((GridDhtCacheEntry)cached).clearInternal(clearVer, extras)) {
+ removeEntry(cached);
if (!cached.isInternal()) {
if (rec) {
@@ -961,9 +883,10 @@ public class GridDhtLocalPartition implements Comparable<GridDhtLocalPartition>,
try {
CacheDataRow row = it0.next();
- GridDhtCacheEntry cached = (GridDhtCacheEntry)cctx.cache().entryEx(row.key());
+ GridCacheMapEntry cached = putEntryIfObsoleteOrAbsent(cctx.affinity().affinityTopologyVersion(),
+ row.key(), null, true, false);
- if (cached.clearInternal(clearVer, extras)) {
+ if (cached instanceof GridDhtCacheEntry && ((GridDhtCacheEntry)cached).clearInternal(clearVer, extras)) {
if (rec) {
cctx.events().addEvent(cached.partition(),
cached.key(),
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionTopologyImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionTopologyImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionTopologyImpl.java
index bf2ab29..38cbb8c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionTopologyImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionTopologyImpl.java
@@ -1960,7 +1960,7 @@ class GridDhtPartitionTopologyImpl implements GridDhtPartitionTopology {
if (part == null)
continue;
- int size = part.size();
+ int size = part.dataStore().size();
if (size >= threshold)
X.println(">>> Local partition [part=" + part.id() + ", size=" + size + ']');
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearCacheAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearCacheAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearCacheAdapter.java
index 872afee..7c1c38b 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearCacheAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearCacheAdapter.java
@@ -134,24 +134,6 @@ public abstract class GridNearCacheAdapter<K, V> extends GridDistributedCacheAda
return dht().preloader();
}
- /** {@inheritDoc} */
- @Override public GridCacheMapEntry entryEx(KeyCacheObject key, boolean touch) {
- GridNearCacheEntry entry = null;
-
- while (true) {
- try {
- entry = (GridNearCacheEntry)super.entryEx(key, touch);
-
- entry.initializeFromDht(ctx.affinity().affinityTopologyVersion());
-
- return entry;
- }
- catch (GridCacheEntryRemovedException ignore) {
- if (log.isDebugEnabled())
- log.debug("Got removed near entry while initializing from DHT entry (will retry): " + entry);
- }
- }
- }
/** {@inheritDoc} */
@Override public GridCacheMapEntry entryEx(KeyCacheObject key, AffinityTopologyVersion topVer) {
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/DataStructuresProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/DataStructuresProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/DataStructuresProcessor.java
index c29e01e..b72a7fb 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/DataStructuresProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/DataStructuresProcessor.java
@@ -973,7 +973,6 @@ public final class DataStructuresProcessor extends GridProcessorAdapter implemen
ccfg.setBackups(cfg.getBackups());
ccfg.setCacheMode(cfg.getCacheMode());
ccfg.setAtomicityMode(cfg.getAtomicityMode());
- ccfg.setOffHeapMaxMemory(cfg.getOffHeapMaxMemory());
ccfg.setNodeFilter(cfg.getNodeFilter());
ccfg.setWriteSynchronizationMode(FULL_SYNC);
ccfg.setAtomicWriteOrderMode(PRIMARY);
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformConfigurationUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformConfigurationUtils.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformConfigurationUtils.java
index 1753cfd..d7395df 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformConfigurationUtils.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformConfigurationUtils.java
@@ -144,19 +144,13 @@ public class PlatformConfigurationUtils {
ccfg.setCacheMode(CacheMode.fromOrdinal(in.readInt()));
ccfg.setCopyOnRead(in.readBoolean());
ccfg.setEagerTtl(in.readBoolean());
- ccfg.setEvictSynchronized(in.readBoolean());
- ccfg.setEvictSynchronizedConcurrencyLevel(in.readInt());
- ccfg.setEvictSynchronizedKeyBufferSize(in.readInt());
- ccfg.setEvictSynchronizedTimeout(in.readLong());
ccfg.setInvalidate(in.readBoolean());
ccfg.setStoreKeepBinary(in.readBoolean());
ccfg.setLoadPreviousValue(in.readBoolean());
ccfg.setDefaultLockTimeout(in.readLong());
ccfg.setLongQueryWarningTimeout(in.readLong());
ccfg.setMaxConcurrentAsyncOperations(in.readInt());
- ccfg.setEvictMaxOverflowRatio(in.readFloat());
ccfg.setName(in.readString());
- ccfg.setOffHeapMaxMemory(in.readLong());
ccfg.setReadFromBackup(in.readBoolean());
ccfg.setRebalanceBatchSize(in.readInt());
ccfg.setRebalanceDelay(in.readLong());
@@ -164,7 +158,6 @@ public class PlatformConfigurationUtils {
ccfg.setRebalanceThrottle(in.readLong());
ccfg.setRebalanceTimeout(in.readLong());
ccfg.setSqlEscapeAll(in.readBoolean());
- ccfg.setSqlOnheapRowCacheSize(in.readInt());
ccfg.setStartSize(in.readInt());
ccfg.setWriteBehindBatchSize(in.readInt());
ccfg.setWriteBehindEnabled(in.readBoolean());
@@ -197,6 +190,9 @@ public class PlatformConfigurationUtils {
ccfg.setNearConfiguration(readNearConfiguration(in));
ccfg.setEvictionPolicy(readEvictionPolicy(in));
+ if (ccfg.getEvictionPolicy() != null)
+ ccfg.setOnheapCacheEnabled(true);
+
ccfg.setAffinity(readAffinityFunction(in));
ccfg.setExpiryPolicyFactory(readExpiryPolicyFactory(in));
@@ -755,19 +751,13 @@ public class PlatformConfigurationUtils {
writeEnumInt(writer, ccfg.getCacheMode(), CacheConfiguration.DFLT_CACHE_MODE);
writer.writeBoolean(ccfg.isCopyOnRead());
writer.writeBoolean(ccfg.isEagerTtl());
- writer.writeBoolean(ccfg.isEvictSynchronized());
- writer.writeInt(ccfg.getEvictSynchronizedConcurrencyLevel());
- writer.writeInt(ccfg.getEvictSynchronizedKeyBufferSize());
- writer.writeLong(ccfg.getEvictSynchronizedTimeout());
writer.writeBoolean(ccfg.isInvalidate());
writer.writeBoolean(ccfg.isStoreKeepBinary());
writer.writeBoolean(ccfg.isLoadPreviousValue());
writer.writeLong(ccfg.getDefaultLockTimeout());
writer.writeLong(ccfg.getLongQueryWarningTimeout());
writer.writeInt(ccfg.getMaxConcurrentAsyncOperations());
- writer.writeFloat(ccfg.getEvictMaxOverflowRatio());
writer.writeString(ccfg.getName());
- writer.writeLong(ccfg.getOffHeapMaxMemory());
writer.writeBoolean(ccfg.isReadFromBackup());
writer.writeInt(ccfg.getRebalanceBatchSize());
writer.writeLong(ccfg.getRebalanceDelay());
@@ -775,7 +765,6 @@ public class PlatformConfigurationUtils {
writer.writeLong(ccfg.getRebalanceThrottle());
writer.writeLong(ccfg.getRebalanceTimeout());
writer.writeBoolean(ccfg.isSqlEscapeAll());
- writer.writeInt(ccfg.getSqlOnheapRowCacheSize());
writer.writeInt(ccfg.getStartSize());
writer.writeInt(ccfg.getWriteBehindBatchSize());
writer.writeBoolean(ccfg.isWriteBehindEnabled());
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheConfiguration.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheConfiguration.java
index 0f5cd46..e087881 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheConfiguration.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheConfiguration.java
@@ -127,7 +127,6 @@ public class VisorCacheConfiguration implements Serializable, LessNamingBean {
writeSynchronizationMode = ccfg.getWriteSynchronizationMode();
invalidate = ccfg.isInvalidate();
startSize = ccfg.getStartSize();
- offHeapMaxMemory = ccfg.getOffHeapMaxMemory();
maxConcurrentAsyncOps = ccfg.getMaxConcurrentAsyncOperations();
interceptor = compactClass(ccfg.getInterceptor());
typeMeta = VisorCacheTypeMetadata.list(ccfg.getQueryEntities(), ccfg.getCacheStoreFactory());
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheEvictionConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheEvictionConfiguration.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheEvictionConfiguration.java
index 05d5c38..b6f72c4 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheEvictionConfiguration.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheEvictionConfiguration.java
@@ -43,21 +43,6 @@ public class VisorCacheEvictionConfiguration implements Serializable, LessNaming
/** Eviction filter to specify which entries should not be evicted. */
private String filter;
- /** Synchronous eviction concurrency level. */
- private int syncConcurrencyLvl;
-
- /** Synchronous eviction timeout. */
- private long syncTimeout;
-
- /** Synchronized key buffer size. */
- private int syncKeyBufSize;
-
- /** Synchronous evicts flag. */
- private boolean evictSynchronized;
-
- /** Eviction max overflow ratio. */
- private float maxOverflowRatio;
-
/**
* @param ccfg Cache configuration.
* @return Data transfer object for eviction configuration properties.
@@ -70,11 +55,6 @@ public class VisorCacheEvictionConfiguration implements Serializable, LessNaming
cfg.plc = compactClass(plc);
cfg.plcMaxSize = evictionPolicyMaxSize(plc);
cfg.filter = compactClass(ccfg.getEvictionFilter());
- cfg.syncConcurrencyLvl = ccfg.getEvictSynchronizedConcurrencyLevel();
- cfg.syncTimeout = ccfg.getEvictSynchronizedTimeout();
- cfg.syncKeyBufSize = ccfg.getEvictSynchronizedKeyBufferSize();
- cfg.evictSynchronized = ccfg.isEvictSynchronized();
- cfg.maxOverflowRatio = ccfg.getEvictMaxOverflowRatio();
return cfg;
}
@@ -100,41 +80,6 @@ public class VisorCacheEvictionConfiguration implements Serializable, LessNaming
return filter;
}
- /**
- * @return synchronized eviction concurrency level.
- */
- public int synchronizedConcurrencyLevel() {
- return syncConcurrencyLvl;
- }
-
- /**
- * @return synchronized eviction timeout.
- */
- public long synchronizedTimeout() {
- return syncTimeout;
- }
-
- /**
- * @return Synchronized key buffer size.
- */
- public int synchronizedKeyBufferSize() {
- return syncKeyBufSize;
- }
-
- /**
- * @return Synchronous evicts flag.
- */
- public boolean evictSynchronized() {
- return evictSynchronized;
- }
-
- /**
- * @return Eviction max overflow ratio.
- */
- public float maxOverflowRatio() {
- return maxOverflowRatio;
- }
-
/** {@inheritDoc} */
@Override public String toString() {
return S.toString(VisorCacheEvictionConfiguration.class, this);
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheQueryConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheQueryConfiguration.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheQueryConfiguration.java
index d753b76..a21cf43 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheQueryConfiguration.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheQueryConfiguration.java
@@ -73,7 +73,6 @@ public class VisorCacheQueryConfiguration implements Serializable, LessNamingBea
longQryWarnTimeout = ccfg.getLongQueryWarningTimeout();
sqlEscapeAll = ccfg.isSqlEscapeAll();
indexedTypes = compactClasses(ccfg.getIndexedTypes());
- sqlOnheapRowCacheSize = ccfg.getSqlOnheapRowCacheSize();
sqlSchema = ccfg.getSqlSchema();
return this;
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/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 80c0887..2cb36f9 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,11 +61,8 @@ public class ClusterNodeMetricsSelfTest extends GridCommonAbstractTest {
/** Amount of cache entries. */
private static final int MAX_VALS_AMOUNT = 400;
- /** With OFFHEAP_VALUES policy. */
- private final String OFF_HEAP_VALUE_NAME = "offHeapValuesCfg";
-
- /** 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 {
@@ -91,25 +87,18 @@ public class ClusterNodeMetricsSelfTest extends GridCommonAbstractTest {
cfg.setCacheConfiguration();
cfg.setMetricsUpdateFrequency(0);
- CacheConfiguration<Integer, Object> offHeapValuesCfg = defaultCacheConfiguration();
- offHeapValuesCfg.setName(OFF_HEAP_VALUE_NAME);
- offHeapValuesCfg.setStatisticsEnabled(true);
- offHeapValuesCfg.setMemoryMode(CacheMemoryMode.OFFHEAP_VALUES);
- offHeapValuesCfg.setOffHeapMaxMemory(MAX_VALS_AMOUNT * VAL_SIZE);
-
- CacheConfiguration<Integer, Object> onHeapTieredCfg = defaultCacheConfiguration();
- onHeapTieredCfg.setName(ON_HEAP_TIERED_NAME);
- onHeapTieredCfg.setStatisticsEnabled(true);
- onHeapTieredCfg.setMemoryMode(CacheMemoryMode.ONHEAP_TIERED);
- onHeapTieredCfg.setOffHeapMaxMemory(MAX_VALS_AMOUNT * VAL_SIZE);
+ CacheConfiguration<Integer, Object> ccfg = defaultCacheConfiguration();
+ ccfg.setName(CACHE_NAME);
+ ccfg.setStatisticsEnabled(true);
FifoEvictionPolicy plc = new FifoEvictionPolicy();
plc.setMaxMemorySize(MAX_VALS_AMOUNT * VAL_SIZE);
plc.setMaxSize(0);
- onHeapTieredCfg.setEvictionPolicy(plc);
+ ccfg.setEvictionPolicy(plc);
+ ccfg.setOnheapCacheEnabled(true);
- return cfg.setCacheConfiguration(offHeapValuesCfg, onHeapTieredCfg);
+ return cfg.setCacheConfiguration(ccfg);
}
/**
@@ -120,32 +109,25 @@ public class ClusterNodeMetricsSelfTest extends GridCommonAbstractTest {
Ignite ignite = grid();
- final IgniteCache onHeapCache = ignite.getOrCreateCache(ON_HEAP_TIERED_NAME);
- final IgniteCache offHeapCache = ignite.getOrCreateCache(OFF_HEAP_VALUE_NAME);
+ final IgniteCache cache = ignite.getOrCreateCache(CACHE_NAME);
- long prevTieredOffHeapSize = onHeapCache.metrics().getOffHeapAllocatedSize();
- long prevValuesOffHeapSize = offHeapCache.metrics().getOffHeapAllocatedSize();
+ long prevTieredOffHeapSize = cache.metrics().getOffHeapAllocatedSize();
assertEquals(0, prevTieredOffHeapSize);
- assertEquals(0, prevValuesOffHeapSize);
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);
- assertEquals(0, offHeapCache.metrics().getOffHeapAllocatedSize());
assertTrue(prevClusterNonHeapMemoryUsed < ignite.cluster().metrics().getNonHeapMemoryUsed());
prevClusterNonHeapMemoryUsed = ignite.cluster().metrics().getNonHeapMemoryUsed();
- prevTieredOffHeapSize = onHeapCache.metrics().getOffHeapAllocatedSize();
-
- fillCache(offHeapCache);
+ prevTieredOffHeapSize = cache.metrics().getOffHeapAllocatedSize();
- assertTrue(offHeapCache.metrics().getOffHeapAllocatedSize() > (MAX_VALS_AMOUNT - 5) * VAL_SIZE);
- 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/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/BinaryObjectOffHeapUnswapTemporaryTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/BinaryObjectOffHeapUnswapTemporaryTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/BinaryObjectOffHeapUnswapTemporaryTest.java
deleted file mode 100644
index 99133b8..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/BinaryObjectOffHeapUnswapTemporaryTest.java
+++ /dev/null
@@ -1,365 +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.Collection;
-import java.util.LinkedHashSet;
-import java.util.Map;
-import java.util.Set;
-import javax.cache.processor.EntryProcessorException;
-import javax.cache.processor.MutableEntry;
-import org.apache.ignite.IgniteCache;
-import org.apache.ignite.binary.BinaryObject;
-import org.apache.ignite.binary.BinaryObjectBuilder;
-import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheEntry;
-import org.apache.ignite.cache.CacheEntryProcessor;
-import org.apache.ignite.cache.CacheMemoryMode;
-import org.apache.ignite.cache.CacheMode;
-import org.apache.ignite.configuration.CacheConfiguration;
-import org.apache.ignite.configuration.IgniteConfiguration;
-import org.apache.ignite.internal.binary.BinaryMarshaller;
-import org.apache.ignite.internal.binary.BinaryObjectOffheapImpl;
-import org.apache.ignite.lang.IgniteInClosure;
-import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
-import org.apache.ignite.transactions.Transaction;
-import org.apache.ignite.transactions.TransactionConcurrency;
-import org.apache.ignite.transactions.TransactionIsolation;
-
-import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
-import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_VALUES;
-
-/**
- *
- */
-public class BinaryObjectOffHeapUnswapTemporaryTest extends GridCommonAbstractTest {
- /** */
- private static final int CNT = 20;
-
- /** Cache name. */
- private static final String CACHE_NAME = "cache";
-
- /** */
- @SuppressWarnings("serial")
- private static final CacheEntryProcessor PROC = new CacheEntryProcessor() {
- @Override public Object process(MutableEntry entry, Object... arguments) throws EntryProcessorException {
- return entry.getValue();
- }
- };
-
- /** */
- private CacheAtomicityMode atomicityMode;
-
- /** {@inheritDoc} */
- @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
- IgniteConfiguration c = super.getConfiguration(igniteInstanceName);
-
- c.setMarshaller(new BinaryMarshaller());
-
- return c;
- }
-
- /**
- * @param atomicityMode Atomicity mode.
- * @param memoryMode Memory mode.
- * @return Cache configuration.
- */
- private CacheConfiguration<Object, Object> cacheConfiguration(CacheAtomicityMode atomicityMode,
- CacheMemoryMode memoryMode) {
- this.atomicityMode = atomicityMode;
-
- CacheConfiguration<Object, Object> cfg = new CacheConfiguration<>();
-
- cfg.setName(CACHE_NAME);
- cfg.setCacheMode(CacheMode.PARTITIONED);
- cfg.setAtomicityMode(atomicityMode);
- cfg.setMemoryMode(memoryMode);
- cfg.setBackups(1);
-
- return cfg;
- }
-
- /** {@inheritDoc} */
- @Override protected void beforeTestsStarted() throws Exception {
- super.beforeTestsStarted();
-
- startGridsMultiThreaded(3);
- }
-
- /** {@inheritDoc} */
- @Override protected void afterTestsStopped() throws Exception {
- super.afterTestsStopped();
-
- stopAllGrids();
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testTxOffheapTiered() throws Exception {
- ignite(0).getOrCreateCache(cacheConfiguration(TRANSACTIONAL, OFFHEAP_TIERED));
-
- try {
- doTest();
- }
- finally {
- ignite(0).destroyCache(null);
- }
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testTxOffheapValues() throws Exception {
- ignite(0).getOrCreateCache(cacheConfiguration(TRANSACTIONAL, OFFHEAP_VALUES));
-
- try {
- doTest();
- }
- finally {
- ignite(0).destroyCache(null);
- }
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testAtomicOffheapTiered() throws Exception {
- ignite(0).getOrCreateCache(cacheConfiguration(ATOMIC, OFFHEAP_TIERED));
-
- try {
- doTest();
- }
- finally {
- ignite(0).destroyCache(null);
- }
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testAtomicOffheapValues() throws Exception {
- ignite(0).getOrCreateCache(cacheConfiguration(ATOMIC, OFFHEAP_VALUES));
-
- try {
- doTest();
- }
- finally {
- ignite(0).destroyCache(null);
- }
- }
-
- /**
- *
- */
- @SuppressWarnings("serial")
- private void doTest() {
- final IgniteCache<Integer, BinaryObject> cache = jcache(0, CACHE_NAME).withKeepBinary();
-
- for (int key = 0; key < CNT; key++)
- jcache(0, CACHE_NAME).put(key, new TestObject(key));
-
- for (int key = CNT; key < 2 * CNT; key++) {
- BinaryObjectBuilder builder = ignite(0).binary().builder("SomeType");
- builder.setField("field1", key);
- builder.setField("field2", "name_" + key);
-
- cache.put(key, builder.build());
- }
-
- Set<Integer> keys = new LinkedHashSet<>();
-
- for (int i = 0; i < 2 * CNT; i++)
- keys.add(i);
-
- check(new IgniteInClosure<Integer>() {
- @Override public void apply(Integer key) {
- assertFalse(cache.get(key) instanceof BinaryObjectOffheapImpl);
- }
- });
-
- check(new IgniteInClosure<Integer>() {
- @Override public void apply(Integer key) {
- assertFalse(cache.getEntry(key).getValue() instanceof BinaryObjectOffheapImpl);
- }
- });
-
- check(new IgniteInClosure<Integer>() {
- @Override public void apply(Integer key) {
- assertFalse(cache.getAndPut(key, cache.get(key)) instanceof BinaryObjectOffheapImpl);
- }
- });
-
- check(new IgniteInClosure<Integer>() {
- @Override public void apply(Integer key) {
- assertFalse(cache.getAndReplace(key, cache.get(key)) instanceof BinaryObjectOffheapImpl);
- }
- });
-
- check(new IgniteInClosure<Integer>() {
- @Override public void apply(Integer key) {
- assertFalse(cache.getAndPutIfAbsent(key, cache.get(key)) instanceof BinaryObjectOffheapImpl);
- }
- });
-
- check(new IgniteInClosure<Integer>() {
- @Override public void apply(Integer key) {
- assertFalse(cache.localPeek(key) instanceof BinaryObjectOffheapImpl);
- }
- });
-
- check(new IgniteInClosure<Integer>() {
- @Override public void apply(Integer key) {
- assertFalse(cache.getAndRemove(key) instanceof BinaryObjectOffheapImpl);
- }
- });
-
- check(new IgniteInClosure<Integer>() {
- @Override public void apply(Integer key) {
- assertFalse(cache.invoke(key, PROC) instanceof BinaryObjectOffheapImpl);
- }
- });
-
- // GetAll.
- Map<Integer, BinaryObject> res = cache.getAll(keys);
-
- for (BinaryObject val : res.values())
- assertFalse(val instanceof BinaryObjectOffheapImpl);
-
- if (atomicityMode == TRANSACTIONAL) {
- for (TransactionIsolation isolation : TransactionIsolation.values()) {
- for (TransactionConcurrency concurrency : TransactionConcurrency.values()) {
- try (Transaction tx = ignite(0).transactions().txStart(concurrency, isolation)) {
- res = cache.getAll(keys);
-
- for (BinaryObject val : res.values())
- assertFalse(val instanceof BinaryObjectOffheapImpl);
-
- tx.commit();
- }
- }
- }
- }
-
- // GetAllOutTx.
- res = cache.getAllOutTx(keys);
-
- for (BinaryObject val : res.values())
- assertFalse(val instanceof BinaryObjectOffheapImpl);
-
- if (atomicityMode == TRANSACTIONAL) {
- for (TransactionIsolation isolation : TransactionIsolation.values()) {
- for (TransactionConcurrency concurrency : TransactionConcurrency.values()) {
- try (Transaction tx = ignite(0).transactions().txStart(concurrency, isolation)) {
- res = cache.getAllOutTx(keys);
-
- for (BinaryObject val : res.values())
- assertFalse(val instanceof BinaryObjectOffheapImpl);
-
- tx.commit();
- }
- }
- }
- }
-
- // InvokeAll.
- res = cache.invokeAll(keys, PROC);
-
- for (BinaryObject val : res.values())
- assertFalse(val instanceof BinaryObjectOffheapImpl);
-
- if (atomicityMode == TRANSACTIONAL) {
- for (TransactionIsolation isolation : TransactionIsolation.values()) {
- for (TransactionConcurrency concurrency : TransactionConcurrency.values()) {
- try (Transaction tx = ignite(0).transactions().txStart(concurrency, isolation)) {
- res = cache.invokeAll(keys, PROC);
-
- for (BinaryObject val : res.values())
- assertFalse(val instanceof BinaryObjectOffheapImpl);
-
- tx.commit();
- }
- }
- }
- }
-
- // GetEntries.
- Collection<CacheEntry<Integer, BinaryObject>> entries = cache.getEntries(keys);
-
- for (CacheEntry<Integer, BinaryObject> e : entries)
- assertFalse(e.getValue() instanceof BinaryObjectOffheapImpl);
-
- if (atomicityMode == TRANSACTIONAL) {
- for (TransactionIsolation isolation : TransactionIsolation.values()) {
- for (TransactionConcurrency concurrency : TransactionConcurrency.values()) {
- try (Transaction tx = ignite(0).transactions().txStart(concurrency, isolation)) {
- entries = cache.getEntries(keys);
-
- for (CacheEntry<Integer, BinaryObject> e : entries)
- assertFalse(e.getValue() instanceof BinaryObjectOffheapImpl);
-
- tx.commit();
- }
- }
- }
- }
- }
-
- /**
- *
- */
- private void check(IgniteInClosure<Integer> checkOp) {
- for (int key = 0; key < 2 * CNT; key++) {
- checkOp.apply(key);
-
- if (atomicityMode == TRANSACTIONAL) {
- for (TransactionIsolation isolation : TransactionIsolation.values()) {
- for (TransactionConcurrency concurrency : TransactionConcurrency.values()) {
- try (Transaction tx = ignite(0).transactions().txStart(concurrency, isolation)) {
- checkOp.apply(key);
-
- tx.commit();
- }
- }
- }
- }
- }
- }
-
- /**
- *
- */
- @SuppressWarnings("PackageVisibleField")
- private static class TestObject {
- /** */
- String field;
-
- /** */
- int field2;
-
- /**
- * @param key Key.
- */
- TestObject(int key) {
- field = "str" + key;
- field2 = key;
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheConfigurationLeakTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheConfigurationLeakTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheConfigurationLeakTest.java
index 5c85d01..df9fbd5 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheConfigurationLeakTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheConfigurationLeakTest.java
@@ -70,6 +70,7 @@ public class CacheConfigurationLeakTest extends GridCommonAbstractTest {
CacheConfiguration<Object, Object> ccfg = new CacheConfiguration<>();
ccfg.setName("cache-" + idx + "-" + i);
ccfg.setEvictionPolicy(new LruEvictionPolicy(1000));
+ ccfg.setOnheapCacheEnabled(true);
IgniteCache<Object, Object> cache = ignite.createCache(ccfg);
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheDeferredDeleteQueueTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheDeferredDeleteQueueTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheDeferredDeleteQueueTest.java
index b764d5b..37d3f4d 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheDeferredDeleteQueueTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheDeferredDeleteQueueTest.java
@@ -116,7 +116,7 @@ public class CacheDeferredDeleteQueueTest extends GridCommonAbstractTest {
for (GridDhtLocalPartition p : top.currentLocalPartitions()) {
Collection<Object> rmvQueue = GridTestUtils.getFieldValue(p, "rmvQueue");
- if (!rmvQueue.isEmpty() || p.size() != 0)
+ if (!rmvQueue.isEmpty() || p.dataStore().size() != 0)
return false;
}
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheDhtLocalPartitionAfterRemoveSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheDhtLocalPartitionAfterRemoveSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheDhtLocalPartitionAfterRemoveSelfTest.java
index 32c31d3..1da94d4 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheDhtLocalPartitionAfterRemoveSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheDhtLocalPartitionAfterRemoveSelfTest.java
@@ -76,7 +76,7 @@ public class CacheDhtLocalPartitionAfterRemoveSelfTest extends GridCommonAbstrac
cache = grid(g).cache(null);
for (GridDhtLocalPartition p : dht(cache).topology().localPartitions()) {
- int size = p.size();
+ int size = p.dataStore().size();
assertTrue("Unexpected size: " + size, size <= 32);
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheEnumOperationsAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheEnumOperationsAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheEnumOperationsAbstractTest.java
index 5829724..2017365 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheEnumOperationsAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheEnumOperationsAbstractTest.java
@@ -22,7 +22,6 @@ import javax.cache.processor.MutableEntry;
import org.apache.ignite.IgniteCache;
import org.apache.ignite.binary.BinaryObject;
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;
@@ -37,9 +36,6 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
import static org.apache.ignite.cache.CacheAtomicWriteOrderMode.PRIMARY;
import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_VALUES;
-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;
@@ -95,25 +91,7 @@ public abstract class CacheEnumOperationsAbstractTest extends GridCommonAbstract
* @throws Exception If failed.
*/
public void testAtomic() throws Exception {
- CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED, 1, ATOMIC, ONHEAP_TIERED);
-
- enumOperations(ccfg);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testAtomicOffheapValues() throws Exception {
- CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED, 1, ATOMIC, OFFHEAP_VALUES);
-
- enumOperations(ccfg);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testAtomicOffheapTiered() throws Exception {
- CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED, 1, ATOMIC, OFFHEAP_TIERED);
+ CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED, 1, ATOMIC);
enumOperations(ccfg);
}
@@ -122,25 +100,7 @@ public abstract class CacheEnumOperationsAbstractTest extends GridCommonAbstract
* @throws Exception If failed.
*/
public void testTx() throws Exception {
- CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED, 1, ATOMIC, ONHEAP_TIERED);
-
- enumOperations(ccfg);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testTxOffheapValues() throws Exception {
- CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED, 1, ATOMIC, OFFHEAP_VALUES);
-
- enumOperations(ccfg);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testTxOffheapTiered() throws Exception {
- CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED, 1, ATOMIC, OFFHEAP_TIERED);
+ CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED, 1, ATOMIC);
enumOperations(ccfg);
}
@@ -269,25 +229,19 @@ public abstract class CacheEnumOperationsAbstractTest extends GridCommonAbstract
* @param cacheMode Cache mode.
* @param backups Number of backups.
* @param atomicityMode Cache atomicity mode.
- * @param memoryMode Cache memory mode.
* @return Cache configuration.
*/
private CacheConfiguration<Object, Object> cacheConfiguration(
CacheMode cacheMode,
int backups,
- CacheAtomicityMode atomicityMode,
- CacheMemoryMode memoryMode) {
+ CacheAtomicityMode atomicityMode) {
CacheConfiguration<Object, Object> ccfg = new CacheConfiguration<>();
ccfg.setAtomicityMode(atomicityMode);
ccfg.setCacheMode(cacheMode);
- ccfg.setMemoryMode(memoryMode);
ccfg.setWriteSynchronizationMode(FULL_SYNC);
ccfg.setAtomicWriteOrderMode(PRIMARY);
- if (memoryMode == OFFHEAP_TIERED)
- ccfg.setOffHeapMaxMemory(0);
-
if (cacheMode == PARTITIONED)
ccfg.setBackups(backups);
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetEntryAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetEntryAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetEntryAbstractTest.java
index daec5a9..0ddac75 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetEntryAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetEntryAbstractTest.java
@@ -171,6 +171,8 @@ public abstract class CacheGetEntryAbstractTest extends GridCacheAbstractSelfTes
* @throws Exception If failed.
*/
public void testLocalTransactional() throws Exception {
+ // TODO: fails since d13520e9a05bd9e9b987529472d6317951b72f96, need to review changes.
+
CacheConfiguration cfg = new CacheConfiguration();
cfg.setWriteSynchronizationMode(FULL_SYNC);
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheInterceptorPartitionCounterLocalSanityTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheInterceptorPartitionCounterLocalSanityTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheInterceptorPartitionCounterLocalSanityTest.java
index 5ca0e29..5fe7d70 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheInterceptorPartitionCounterLocalSanityTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheInterceptorPartitionCounterLocalSanityTest.java
@@ -33,7 +33,6 @@ import org.apache.ignite.IgniteCache;
import org.apache.ignite.cache.CacheAtomicityMode;
import org.apache.ignite.cache.CacheInterceptorAdapter;
import org.apache.ignite.cache.CacheInterceptorEntry;
-import org.apache.ignite.cache.CacheMemoryMode;
import org.apache.ignite.cache.store.CacheStore;
import org.apache.ignite.cache.store.CacheStoreAdapter;
import org.apache.ignite.configuration.CacheConfiguration;
@@ -53,7 +52,6 @@ import static java.util.concurrent.TimeUnit.MILLISECONDS;
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.LOCAL;
import static org.apache.ignite.transactions.TransactionIsolation.READ_COMMITTED;
import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_READ;
@@ -114,10 +112,7 @@ public class CacheInterceptorPartitionCounterLocalSanityTest extends GridCommonA
* @throws Exception If failed.
*/
public void testLocal() throws Exception {
- CacheConfiguration<Object, Object> ccfg = cacheConfiguration(
- ATOMIC,
- ONHEAP_TIERED,
- false);
+ CacheConfiguration<Object, Object> ccfg = cacheConfiguration(ATOMIC,false);
doTestPartitionCounterOperation(ccfg);
}
@@ -126,10 +121,7 @@ public class CacheInterceptorPartitionCounterLocalSanityTest extends GridCommonA
* @throws Exception If failed.
*/
public void testLocalWithStore() throws Exception {
- CacheConfiguration<Object, Object> ccfg = cacheConfiguration(
- ATOMIC,
- ONHEAP_TIERED,
- true);
+ CacheConfiguration<Object, Object> ccfg = cacheConfiguration(ATOMIC,true);
doTestPartitionCounterOperation(ccfg);
}
@@ -138,10 +130,7 @@ public class CacheInterceptorPartitionCounterLocalSanityTest extends GridCommonA
* @throws Exception If failed.
*/
public void testLocalTx() throws Exception {
- CacheConfiguration<Object, Object> ccfg = cacheConfiguration(
- TRANSACTIONAL,
- ONHEAP_TIERED,
- false);
+ CacheConfiguration<Object, Object> ccfg = cacheConfiguration(TRANSACTIONAL,false);
doTestPartitionCounterOperation(ccfg);
}
@@ -150,10 +139,7 @@ public class CacheInterceptorPartitionCounterLocalSanityTest extends GridCommonA
* @throws Exception If failed.
*/
public void testLocalTxWithStore() throws Exception {
- CacheConfiguration<Object, Object> ccfg = cacheConfiguration(
- TRANSACTIONAL,
- ONHEAP_TIERED,
- true);
+ CacheConfiguration<Object, Object> ccfg = cacheConfiguration(TRANSACTIONAL,true);
doTestPartitionCounterOperation(ccfg);
}
@@ -488,18 +474,15 @@ public class CacheInterceptorPartitionCounterLocalSanityTest extends GridCommonA
/**
* @param atomicityMode Cache atomicity mode.
- * @param memoryMode Cache memory mode.
* @param store If {@code true} configures dummy cache store.
* @return Cache configuration.
*/
protected CacheConfiguration<Object, Object> cacheConfiguration(
CacheAtomicityMode atomicityMode,
- CacheMemoryMode memoryMode,
boolean store) {
CacheConfiguration<TestKey, TestValue> ccfg = new CacheConfiguration<>();
ccfg.setAtomicityMode(atomicityMode);
- ccfg.setMemoryMode(memoryMode);
ccfg.setCacheMode(LOCAL);
if (store) {
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheInterceptorPartitionCounterRandomOperationsTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheInterceptorPartitionCounterRandomOperationsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheInterceptorPartitionCounterRandomOperationsTest.java
index 97a815b..5b7769e 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheInterceptorPartitionCounterRandomOperationsTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheInterceptorPartitionCounterRandomOperationsTest.java
@@ -39,7 +39,6 @@ import org.apache.ignite.IgniteCache;
import org.apache.ignite.cache.CacheAtomicityMode;
import org.apache.ignite.cache.CacheInterceptorAdapter;
import org.apache.ignite.cache.CacheInterceptorEntry;
-import org.apache.ignite.cache.CacheMemoryMode;
import org.apache.ignite.cache.CacheMode;
import org.apache.ignite.cache.affinity.Affinity;
import org.apache.ignite.cache.store.CacheStore;
@@ -64,9 +63,6 @@ import static java.util.concurrent.TimeUnit.SECONDS;
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.OFFHEAP_TIERED;
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_VALUES;
-import static org.apache.ignite.cache.CacheMemoryMode.ONHEAP_TIERED;
import static org.apache.ignite.cache.CacheMode.PARTITIONED;
import static org.apache.ignite.cache.CacheMode.REPLICATED;
import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
@@ -153,7 +149,6 @@ public class CacheInterceptorPartitionCounterRandomOperationsTest extends GridCo
CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
1,
ATOMIC,
- ONHEAP_TIERED,
false);
doTestPartitionCounterOperation(ccfg);
@@ -166,7 +161,6 @@ public class CacheInterceptorPartitionCounterRandomOperationsTest extends GridCo
CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
1,
ATOMIC,
- ONHEAP_TIERED,
true);
doTestPartitionCounterOperation(ccfg);
@@ -179,7 +173,6 @@ public class CacheInterceptorPartitionCounterRandomOperationsTest extends GridCo
CacheConfiguration<Object, Object> ccfg = cacheConfiguration(REPLICATED,
0,
ATOMIC,
- ONHEAP_TIERED,
false);
doTestPartitionCounterOperation(ccfg);
@@ -192,7 +185,6 @@ public class CacheInterceptorPartitionCounterRandomOperationsTest extends GridCo
CacheConfiguration<Object, Object> ccfg = cacheConfiguration(REPLICATED,
0,
ATOMIC,
- ONHEAP_TIERED,
true);
doTestPartitionCounterOperation(ccfg);
@@ -201,50 +193,10 @@ public class CacheInterceptorPartitionCounterRandomOperationsTest extends GridCo
/**
* @throws Exception If failed.
*/
- public void testAtomicOffheapValues() throws Exception {
- CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
- 1,
- ATOMIC,
- OFFHEAP_VALUES,
- false);
-
- doTestPartitionCounterOperation(ccfg);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testAtomicOffheapValuesWithStore() throws Exception {
- CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
- 1,
- ATOMIC,
- OFFHEAP_VALUES,
- true);
-
- doTestPartitionCounterOperation(ccfg);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testAtomicOffheapTiered() throws Exception {
- CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
- 1,
- ATOMIC,
- OFFHEAP_TIERED,
- false);
-
- doTestPartitionCounterOperation(ccfg);
- }
-
- /**
- * @throws Exception If failed.
- */
public void testAtomicNoBackups() throws Exception {
CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
0,
ATOMIC,
- ONHEAP_TIERED,
false);
doTestPartitionCounterOperation(ccfg);
@@ -257,7 +209,6 @@ public class CacheInterceptorPartitionCounterRandomOperationsTest extends GridCo
CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
1,
TRANSACTIONAL,
- ONHEAP_TIERED,
false);
doTestPartitionCounterOperation(ccfg);
@@ -270,7 +221,6 @@ public class CacheInterceptorPartitionCounterRandomOperationsTest extends GridCo
CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
1,
TRANSACTIONAL,
- ONHEAP_TIERED,
true);
doTestPartitionCounterOperation(ccfg);
@@ -283,7 +233,6 @@ public class CacheInterceptorPartitionCounterRandomOperationsTest extends GridCo
CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
1,
TRANSACTIONAL,
- ONHEAP_TIERED,
false);
doTestPartitionCounterOperation(ccfg);
@@ -296,7 +245,6 @@ public class CacheInterceptorPartitionCounterRandomOperationsTest extends GridCo
CacheConfiguration<Object, Object> ccfg = cacheConfiguration(REPLICATED,
0,
TRANSACTIONAL,
- ONHEAP_TIERED,
false);
doTestPartitionCounterOperation(ccfg);
@@ -309,7 +257,6 @@ public class CacheInterceptorPartitionCounterRandomOperationsTest extends GridCo
CacheConfiguration<Object, Object> ccfg = cacheConfiguration(REPLICATED,
0,
TRANSACTIONAL,
- ONHEAP_TIERED,
true);
doTestPartitionCounterOperation(ccfg);
@@ -318,63 +265,10 @@ public class CacheInterceptorPartitionCounterRandomOperationsTest extends GridCo
/**
* @throws Exception If failed.
*/
- public void testTxOffheapValues() throws Exception {
- CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
- 1,
- TRANSACTIONAL,
- OFFHEAP_VALUES,
- false);
-
- doTestPartitionCounterOperation(ccfg);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testTxOffheapValuesExplicit() throws Exception {
- CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
- 1,
- TRANSACTIONAL,
- OFFHEAP_VALUES,
- false);
-
- doTestPartitionCounterOperation(ccfg);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testTxOffheapTiered() throws Exception {
- CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
- 1,
- TRANSACTIONAL,
- OFFHEAP_TIERED,
- false);
-
- doTestPartitionCounterOperation(ccfg);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testTxOffheapTieredExplicit() throws Exception {
- CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
- 1,
- TRANSACTIONAL,
- OFFHEAP_TIERED,
- false);
-
- doTestPartitionCounterOperation(ccfg);
- }
-
- /**
- * @throws Exception If failed.
- */
public void testTxNoBackups() throws Exception {
CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
0,
TRANSACTIONAL,
- ONHEAP_TIERED,
false);
doTestPartitionCounterOperation(ccfg);
@@ -387,7 +281,6 @@ public class CacheInterceptorPartitionCounterRandomOperationsTest extends GridCo
CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
0,
TRANSACTIONAL,
- ONHEAP_TIERED,
true);
doTestPartitionCounterOperation(ccfg);
@@ -400,7 +293,6 @@ public class CacheInterceptorPartitionCounterRandomOperationsTest extends GridCo
CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
0,
TRANSACTIONAL,
- ONHEAP_TIERED,
false);
doTestPartitionCounterOperation(ccfg);
@@ -824,7 +716,6 @@ public class CacheInterceptorPartitionCounterRandomOperationsTest extends GridCo
* @param cacheMode Cache mode.
* @param backups Number of backups.
* @param atomicityMode Cache atomicity mode.
- * @param memoryMode Cache memory mode.
* @param store If {@code true} configures dummy cache store.
* @return Cache configuration.
*/
@@ -832,13 +723,11 @@ public class CacheInterceptorPartitionCounterRandomOperationsTest extends GridCo
CacheMode cacheMode,
int backups,
CacheAtomicityMode atomicityMode,
- CacheMemoryMode memoryMode,
boolean store) {
CacheConfiguration<TestKey, TestValue> 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/c56c4b8c/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..9bd7a8c 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<Integer, Integer> 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<Integer, Integer> ccfg) throws Exception {
final List<Ignite> putNodes = new ArrayList<>();
@@ -327,7 +316,6 @@ public class CacheNearReaderUpdateTest extends GridCommonAbstractTest {
", near=" + (ccfg.getNearConfiguration() != null) +
", store=" + ccfg.isWriteThrough() +
", evictPlc=" + (ccfg.getEvictionPolicy() != null) +
- ", maxOffheap=" + ccfg.getOffHeapMaxMemory() +
']');
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/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 1cb52c3..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,9 +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.OFFHEAP_TIERED;
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_VALUES;
-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;
@@ -67,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;
@@ -96,46 +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(OFFHEAP_TIERED, ATOMIC, LOCAL, GridLocalCacheEntry.class);
+ checkCacheMapEntry(TRANSACTIONAL, LOCAL, GridLocalCacheEntry.class);
- checkCacheMapEntry(OFFHEAP_VALUES, ATOMIC, LOCAL, GridLocalCacheEntry.class);
+ checkCacheMapEntry(ATOMIC, PARTITIONED, GridNearCacheEntry.class);
- checkCacheMapEntry(ONHEAP_TIERED, TRANSACTIONAL, LOCAL, GridLocalCacheEntry.class);
+ checkCacheMapEntry(TRANSACTIONAL, PARTITIONED, GridNearCacheEntry.class);
- checkCacheMapEntry(OFFHEAP_TIERED, TRANSACTIONAL, LOCAL, GridLocalCacheEntry.class);
+ checkCacheMapEntry(ATOMIC, REPLICATED, GridDhtAtomicCacheEntry.class);
- checkCacheMapEntry(OFFHEAP_VALUES, TRANSACTIONAL, LOCAL, GridLocalCacheEntry.class);
-
- checkCacheMapEntry(ONHEAP_TIERED, ATOMIC, PARTITIONED, GridNearCacheEntry.class);
-
- checkCacheMapEntry(ONHEAP_TIERED, TRANSACTIONAL, PARTITIONED, GridNearCacheEntry.class);
-
- checkCacheMapEntry(ONHEAP_TIERED, 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/c56c4b8c/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 bd43956..f609af3 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;
@@ -96,65 +95,36 @@ public class CachePutEventListenerErrorSelfTest extends GridCommonAbstractTest {
* @throws Exception If failed.
*/
public void testPartitionedAtomicOnHeap() throws Exception {
- doTest(CacheMode.PARTITIONED, CacheAtomicityMode.ATOMIC, CacheMemoryMode.ONHEAP_TIERED);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testPartitionedAtomicOffHeap() throws Exception {
- doTest(CacheMode.PARTITIONED, CacheAtomicityMode.ATOMIC, CacheMemoryMode.OFFHEAP_TIERED);
+ doTest(CacheMode.PARTITIONED, CacheAtomicityMode.ATOMIC);
}
/**
* @throws Exception If failed.
*/
public void testPartitionedTransactionalOnHeap() throws Exception {
- doTest(CacheMode.PARTITIONED, CacheAtomicityMode.TRANSACTIONAL, CacheMemoryMode.ONHEAP_TIERED);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testPartitionedTransactionalOffHeap() throws Exception {
- doTest(CacheMode.PARTITIONED, CacheAtomicityMode.TRANSACTIONAL, CacheMemoryMode.OFFHEAP_TIERED);
+ doTest(CacheMode.PARTITIONED, CacheAtomicityMode.TRANSACTIONAL);
}
/**
* @throws Exception If failed.
*/
public void testReplicatedAtomicOnHeap() throws Exception {
- doTest(CacheMode.REPLICATED, CacheAtomicityMode.ATOMIC, CacheMemoryMode.ONHEAP_TIERED);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testReplicatedAtomicOffHeap() throws Exception {
- doTest(CacheMode.REPLICATED, CacheAtomicityMode.ATOMIC, CacheMemoryMode.OFFHEAP_TIERED);
+ doTest(CacheMode.REPLICATED, CacheAtomicityMode.ATOMIC);
}
/**
* @throws Exception If failed.
*/
public void testReplicatedTransactionalOnHeap() throws Exception {
- doTest(CacheMode.REPLICATED, CacheAtomicityMode.TRANSACTIONAL, CacheMemoryMode.ONHEAP_TIERED);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testReplicatedTransactionalOffHeap() throws Exception {
- doTest(CacheMode.REPLICATED, CacheAtomicityMode.TRANSACTIONAL, CacheMemoryMode.OFFHEAP_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");
@@ -164,7 +134,6 @@ public class CachePutEventListenerErrorSelfTest extends GridCommonAbstractTest {
cfg.setName("cache");
cfg.setCacheMode(cacheMode);
cfg.setAtomicityMode(atomicityMode);
- cfg.setMemoryMode(memMode);
IgniteCache<Integer, Integer> cache = ignite.createCache(cfg);
[13/17] ignite git commit: IGNITE-4535 - Add option to store
deserialized values on-heap
Posted by ag...@apache.org.
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapTieredAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapTieredAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapTieredAbstractSelfTest.java
deleted file mode 100644
index 9c666a4..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapTieredAbstractSelfTest.java
+++ /dev/null
@@ -1,679 +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.Arrays;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.locks.Lock;
-import javax.cache.Cache;
-import javax.cache.processor.EntryProcessor;
-import javax.cache.processor.MutableEntry;
-import org.apache.ignite.IgniteCache;
-import org.apache.ignite.cache.CacheMode;
-import org.apache.ignite.cache.CachePeekMode;
-import org.apache.ignite.configuration.CacheConfiguration;
-import org.apache.ignite.configuration.NearCacheConfiguration;
-import org.apache.ignite.lang.IgnitePredicate;
-import org.apache.ignite.transactions.Transaction;
-import org.apache.ignite.transactions.TransactionConcurrency;
-import org.jetbrains.annotations.Nullable;
-import org.junit.Assert;
-
-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.OFFHEAP_TIERED;
-import static org.apache.ignite.cache.CacheMode.PARTITIONED;
-import static org.apache.ignite.transactions.TransactionConcurrency.OPTIMISTIC;
-import static org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC;
-import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_READ;
-
-/**
- *
- */
-public abstract class GridCacheOffHeapTieredAbstractSelfTest extends GridCacheAbstractSelfTest {
- /** {@inheritDoc} */
- @Override protected int gridCount() {
- return 4;
- }
-
- /** {@inheritDoc} */
- @Override protected CacheMode cacheMode() {
- return PARTITIONED;
- }
-
- /** {@inheritDoc} */
- @Override protected NearCacheConfiguration nearConfiguration() {
- return null;
- }
-
- /** {@inheritDoc} */
- protected boolean binaryEnabled() {
- return false;
- }
-
- /** {@inheritDoc} */
- @Override protected CacheConfiguration cacheConfiguration(String igniteInstanceName) throws Exception {
- CacheConfiguration ccfg = super.cacheConfiguration(igniteInstanceName);
-
- ccfg.setAtomicWriteOrderMode(PRIMARY);
-
- ccfg.setMemoryMode(OFFHEAP_TIERED);
- ccfg.setOffHeapMaxMemory(1024 * 1024);
-
- return ccfg;
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testTransform() throws Exception {
- IgniteCache<Integer, Integer> cache = grid(0).cache(null);
-
- checkTransform(primaryKey(cache));
-
- checkTransform(backupKey(cache));
-
- checkTransform(nearKey(cache));
- }
-
- /**
- * @param key Key.
- * @throws Exception If failed.
- */
- private void checkTransform(Integer key) throws Exception {
- IgniteCache<Integer, Integer> c = grid(0).cache(null);
-
- c.invoke(key, new EntryProcessor<Integer, Integer, Void>() {
- @Override public Void process(MutableEntry<Integer, Integer> e, Object... args) {
- Integer val = e.getValue();
-
- assertNull("Unexpected value: " + val, val);
-
- return null;
- }
- });
-
- c.put(key, 1);
-
- c.invoke(key, new EntryProcessor<Integer, Integer, Void>() {
- @Override public Void process(MutableEntry<Integer, Integer> e, Object... args) {
- Integer val = e.getValue();
-
- assertNotNull("Unexpected value: " + val, val);
-
- assertEquals((Integer) 1, val);
-
- e.setValue(val + 1);
-
- return null;
- }
- });
-
- assertEquals((Integer)2, c.get(key));
-
- c.invoke(key, new EntryProcessor<Integer, Integer, Void>() {
- @Override public Void process(MutableEntry<Integer, Integer> e, Object... args) {
- Integer val = e.getValue();
-
- assertNotNull("Unexpected value: " + val, val);
-
- assertEquals((Integer)2, val);
-
- e.setValue(val);
-
- return null;
- }
- });
-
- assertEquals((Integer)2, c.get(key));
-
- c.invoke(key, new EntryProcessor<Integer, Integer, Void>() {
- @Override public Void process(MutableEntry<Integer, Integer> e, Object... args) {
- Integer val = e.getValue();
-
- assertNotNull("Unexpected value: " + val, val);
-
- assertEquals((Integer)2, val);
-
- e.remove();
-
- return null;
- }
- });
-
- assertNull(c.get(key));
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testPutGetRemove() throws Exception {
- IgniteCache<Integer, Integer> c = grid(0).cache(null);
-
- checkPutGetRemove(primaryKey(c));
-
- checkPutGetRemove(backupKey(c));
-
- checkPutGetRemove(nearKey(c));
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testPutGetRemoveByteArray() throws Exception {
- IgniteCache<Integer, Integer> c = grid(0).cache(null);
-
- checkPutGetRemoveByteArray(primaryKey(c));
-
- checkPutGetRemoveByteArray(backupKey(c));
-
- checkPutGetRemoveByteArray(nearKey(c));
- }
-
- /**
- * @param key Key.
- * @throws Exception If failed.
- */
- private void checkPutGetRemove(Integer key) throws Exception {
- IgniteCache<Integer, Integer> c = grid(0).cache(null);
-
- checkValue(key, null);
-
- assertNull(c.getAndPut(key, key));
-
- checkValue(key, key);
-
- assertEquals(key, c.getAndRemove(key));
-
- checkValue(key, null);
-
- if (atomicityMode() == TRANSACTIONAL) {
- checkPutGetRemoveTx(key, PESSIMISTIC);
-
- checkPutGetRemoveTx(key, OPTIMISTIC);
- }
- }
-
- /**
- * @param key Key.
- * @throws Exception If failed.
- */
- private void checkPutGetRemoveByteArray(Integer key) throws Exception {
- IgniteCache<Integer, byte[]> c = grid(0).cache(null);
-
- checkValue(key, null);
-
- byte[] val = new byte[] {key.byteValue()};
-
- assertNull(c.getAndPut(key, val));
-
- checkValue(key, val);
-
- Assert.assertArrayEquals(val, c.getAndRemove(key));
-
- checkValue(key, null);
-
- if (atomicityMode() == TRANSACTIONAL) {
- checkPutGetRemoveTxByteArray(key, PESSIMISTIC);
-
- checkPutGetRemoveTxByteArray(key, OPTIMISTIC);
- }
- }
-
- /**
- * @param key Key,
- * @param txConcurrency Transaction concurrency.
- * @throws Exception If failed.
- */
- private void checkPutGetRemoveTx(Integer key, TransactionConcurrency txConcurrency) throws Exception {
- IgniteCache<Integer, Integer> c = grid(0).cache(null);
-
- Transaction tx = grid(0).transactions().txStart(txConcurrency, REPEATABLE_READ);
-
- assertNull(c.getAndPut(key, key));
-
- tx.commit();
-
- checkValue(key, key);
-
- tx = grid(0).transactions().txStart(txConcurrency, REPEATABLE_READ);
-
- assertEquals(key, c.getAndRemove(key));
-
- tx.commit();
-
- checkValue(key, null);
- }
-
- /**
- * @param key Key,
- * @param txConcurrency Transaction concurrency.
- * @throws Exception If failed.
- */
- private void checkPutGetRemoveTxByteArray(Integer key, TransactionConcurrency txConcurrency) throws Exception {
- IgniteCache<Integer, byte[]> c = grid(0).cache(null);
-
- Transaction tx = grid(0).transactions().txStart(txConcurrency, REPEATABLE_READ);
-
- byte[] val = new byte[] {key.byteValue()};
-
- assertNull(c.getAndPut(key, val));
-
- tx.commit();
-
- checkValue(key, val);
-
- tx = grid(0).transactions().txStart(txConcurrency, REPEATABLE_READ);
-
- Assert.assertArrayEquals(val, c.getAndRemove(key));
-
- tx.commit();
-
- checkValue(key, null);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testPromote() throws Exception {
- // TODO: GG-11148 check if test makes sense.
- if (true)
- return;
-
- IgniteCache<Integer, TestValue> c = grid(0).cache(null);
-
- TestValue val = new TestValue(new byte[100 * 1024]);
-
- List<Integer> keys = primaryKeys(c, 200);
-
- for (Integer key : keys)
- c.put(key, val);
-
- c.localPromote(new HashSet<>(keys));
-
- for (Integer key : keys) {
- TestValue val0 = c.get(key);
-
- Assert.assertArrayEquals(val.val, val0.val);
- }
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testPutAllGetAllRemoveAll() throws Exception {
- Map<Integer, Integer> map = new HashMap<>();
-
- for (int i = 0; i < 100; i++)
- map.put(i, i);
-
- IgniteCache<Integer, Integer> c = grid(0).cache(null);
-
- Map<Integer, Integer> map0 = c.getAll(map.keySet());
-
- assertTrue(map0.isEmpty());
-
- c.putAll(map);
-
- map0 = c.getAll(map.keySet());
-
- assertEquals(map, map0);
-
- for (Map.Entry<Integer, Integer> e : map.entrySet())
- checkValue(e.getKey(), e.getValue());
-
- c.invokeAll(map.keySet(), new EntryProcessor<Integer, Integer, Void>() {
- @Override public Void process(MutableEntry<Integer, Integer> e, Object... args) {
- Integer val = e.getValue();
-
- e.setValue(val + 1);
-
- return null;
- }
- });
-
- map0 = c.getAll(map.keySet());
-
- for (Map.Entry<Integer, Integer> e : map0.entrySet())
- assertEquals((Integer)(e.getKey() + 1), e.getValue());
-
- for (Map.Entry<Integer, Integer> e : map.entrySet())
- checkValue(e.getKey(), e.getValue() + 1);
-
- c.removeAll(map.keySet());
-
- map0 = c.getAll(map.keySet());
-
- assertTrue(map0.isEmpty());
-
- for (Map.Entry<Integer, Integer> e : map.entrySet())
- checkValue(e.getKey(), null);
-
- if (atomicityMode() == TRANSACTIONAL) {
- checkPutAllGetAllRemoveAllTx(PESSIMISTIC);
-
- checkPutAllGetAllRemoveAllTx(OPTIMISTIC);
- }
- }
-
- /**
- * @param txConcurrency Transaction concurrency.
- * @throws Exception If failed.
- */
- private void checkPutAllGetAllRemoveAllTx(TransactionConcurrency txConcurrency) throws Exception {
- Map<Integer, Integer> map = new HashMap<>();
-
- for (int i = 0; i < 100; i++)
- map.put(i, i);
-
- IgniteCache<Integer, Integer> c = grid(0).cache(null);
-
- Map<Integer, Integer> map0 = c.getAll(map.keySet());
-
- assertTrue(map0.isEmpty());
-
- try (Transaction tx = grid(0).transactions().txStart(txConcurrency, REPEATABLE_READ)) {
- c.putAll(map);
-
- tx.commit();
- }
-
- map0 = c.getAll(map.keySet());
-
- assertEquals(map, map0);
-
- for (Map.Entry<Integer, Integer> e : map.entrySet())
- checkValue(e.getKey(), e.getValue());
-
- try (Transaction tx = grid(0).transactions().txStart(txConcurrency, REPEATABLE_READ)) {
- c.removeAll(map.keySet());
-
- tx.commit();
- }
-
- map0 = c.getAll(map.keySet());
-
- assertTrue(map0.isEmpty());
-
- for (Map.Entry<Integer, Integer> e : map.entrySet())
- checkValue(e.getKey(), null);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testPutGetRemoveObject() throws Exception {
- IgniteCache<Integer, Integer> c = grid(0).cache(null);
-
- checkPutGetRemoveObject(primaryKey(c));
-
- checkPutGetRemoveObject(backupKey(c));
-
- checkPutGetRemoveObject(nearKey(c));
- }
-
- /**
- * @param key Key.
- * @throws Exception If failed.
- */
- private void checkPutGetRemoveObject(Integer key) throws Exception {
- IgniteCache<Integer, TestValue> c = grid(0).cache(null);
-
- checkValue(key, null);
-
- TestValue val = new TestValue(new byte[10]);
-
- assertNull(c.getAndPut(key, val));
-
- checkValue(key, val);
-
- TestValue val2 = new TestValue(new byte[10]);
-
- if (binaryEnabled()) // TODO: IGNITE-608, check return value when fixed.
- c.put(key, val);
- else
- assertEquals(val, c.getAndPut(key, val));
-
- checkValue(key, val2);
-
- if (binaryEnabled()) // TODO: IGNITE-608, check return value when fixed.
- c.remove(key);
- else
- assertEquals(val2, c.getAndRemove(key));
-
- checkValue(key, null);
-
- if (atomicityMode() == TRANSACTIONAL) {
- checkPutGetRemoveTx(key, PESSIMISTIC);
-
- checkPutGetRemoveTx(key, OPTIMISTIC);
- }
- }
-
- /**
- * @param key Key,
- * @param txConcurrency Transaction concurrency.
- * @throws Exception If failed.
- */
- private void checkPutGetRemoveObjectTx(Integer key, TransactionConcurrency txConcurrency) throws Exception {
- IgniteCache<Integer, TestValue> c = grid(0).cache(null);
-
- TestValue val = new TestValue(new byte[10]);
-
- Transaction tx = grid(0).transactions().txStart(txConcurrency, REPEATABLE_READ);
-
- assertNull(c.getAndPut(key, val));
-
- tx.commit();
-
- checkValue(key, val);
-
- tx = grid(0).transactions().txStart(txConcurrency, REPEATABLE_READ);
-
- assertEquals(val, c.getAndRemove(key));
-
- tx.commit();
-
- checkValue(key, null);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testLockUnlock() throws Exception {
- if (atomicityMode() == ATOMIC)
- return;
-
- IgniteCache<Integer, TestValue> c = grid(0).cache(null);
-
- checkLockUnlock(primaryKey(c));
-
- checkLockUnlock(backupKey(c));
-
- checkLockUnlock(nearKey(c));
- }
-
- /**
- * @param key Key.
- * @throws Exception If failed.
- */
- @SuppressWarnings("UnnecessaryLocalVariable")
- private void checkLockUnlock(Integer key) throws Exception {
- IgniteCache<Integer, Integer> c = grid(0).cache(null);
-
- Integer val = key;
-
- c.put(key, val);
-
- assertNull(c.localPeek(key, CachePeekMode.ONHEAP));
-
- Lock lock = c.lock(key);
-
- lock.lock();
-
- assertTrue(c.isLocalLocked(key, false));
-
- lock.unlock();
-
- assertFalse(c.isLocalLocked(key, false));
-
- assertNull(c.localPeek(key, CachePeekMode.ONHEAP));
-
- checkValue(key, val);
- }
-
- /**
- * @param key Key.
- * @param val Value.
- * @throws Exception If failed.
- */
- private void checkValue(Object key, @Nullable Object val) throws Exception {
- for (int i = 0; i < gridCount(); i++) {
- if (val != null && val.getClass() == byte[].class) {
- Assert.assertArrayEquals("Unexpected value for grid: " + i,
- (byte[])val,
- (byte[])grid(i).cache(null).get(key));
- }
- else
- assertEquals("Unexpected value for grid: " + i, val, grid(i).cache(null).get(key));
- }
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testUnswap() throws Exception {
- IgniteCache<Integer, Integer> c = grid(0).cache(null);
-
- checkUnswap(primaryKey(c));
-
- checkUnswap(backupKey(c));
-
- checkUnswap(nearKey(c));
- }
-
- /**
- * @param key Key.
- * @throws Exception If failed.
- */
- private void checkUnswap(Integer key) throws Exception {
- IgniteCache<Integer, Integer> c = grid(0).cache(null);
-
- for (int i = 0; i < gridCount(); i++) {
- assertEquals("Unexpected entries for grid: " + i, 0, grid(i).cache(null).localSize(CachePeekMode.OFFHEAP));
-
- assertEquals("Unexpected offheap size for grid: " + i, 0, internalCache(i).offHeapAllocatedSize());
- }
-
- assertNull(c.localPeek(key, CachePeekMode.ONHEAP));
-
- c.put(key, key);
-
- assertNull(c.localPeek(key, CachePeekMode.ONHEAP));
-
- assertEquals(key, c.get(key));
-
- assertNull(c.localPeek(key, CachePeekMode.ONHEAP));
-
- assertTrue(c.remove(key));
-
- assertNull(c.localPeek(key, CachePeekMode.ONHEAP));
-
- for (int i = 0; i < gridCount(); i++) {
- assertEquals("Unexpected entries for grid: " + i, 0, grid(i).cache(null).localSize(CachePeekMode.OFFHEAP));
-
- assertEquals("Unexpected offheap size for grid: " + i, 0, internalCache(i).offHeapAllocatedSize());
- }
- }
-
- /**
- *
- */
- @SuppressWarnings("PublicInnerClass")
- public static class TestEntryPredicate implements IgnitePredicate<Cache.Entry<Integer, Integer>> {
- /** */
- private Integer expVal;
-
- /**
- * @param expVal Expected value.
- */
- TestEntryPredicate(Integer expVal) {
- this.expVal = expVal;
- }
-
- /** {@inheritDoc} */
- @Override public boolean apply(Cache.Entry<Integer, Integer> e) {
- assertEquals(expVal, e.getValue());
-
- return true;
- }
- }
-
- /**
- *
- */
- @SuppressWarnings("PublicInnerClass")
- public static class TestValue {
- /** */
- @SuppressWarnings("PublicField")
- public byte[] val;
-
- /**
- * Default constructor.
- */
- public TestValue() {
- // No-op.
- }
-
- /**
- * @param val Value.
- */
- public TestValue(byte[] val) {
- this.val = val;
- }
-
- /** {@inheritDoc} */
- @Override public boolean equals(Object o) {
- if (this == o)
- return true;
-
- if (o == null || getClass() != o.getClass())
- return false;
-
- TestValue other = (TestValue)o;
-
- return Arrays.equals(val, other.val);
- }
-
- /** {@inheritDoc} */
- @Override public int hashCode() {
- return Arrays.hashCode(val);
- }
-
- /** {@inheritDoc} */
- @Override public String toString() {
- return "TestValue{" +
- "val=" + Arrays.toString(val) +
- '}';
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapTieredAtomicSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapTieredAtomicSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapTieredAtomicSelfTest.java
deleted file mode 100644
index f296929..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapTieredAtomicSelfTest.java
+++ /dev/null
@@ -1,32 +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 org.apache.ignite.cache.CacheAtomicityMode;
-
-import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
-
-/**
- *
- */
-public class GridCacheOffHeapTieredAtomicSelfTest extends GridCacheOffHeapTieredAbstractSelfTest {
- /** {@inheritDoc} */
- @Override protected CacheAtomicityMode atomicityMode() {
- return ATOMIC;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapTieredEvictionAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapTieredEvictionAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapTieredEvictionAbstractSelfTest.java
deleted file mode 100644
index be6e59a..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapTieredEvictionAbstractSelfTest.java
+++ /dev/null
@@ -1,364 +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.io.Serializable;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.concurrent.Callable;
-import java.util.concurrent.ThreadLocalRandom;
-import javax.cache.Cache;
-import javax.cache.processor.EntryProcessor;
-import javax.cache.processor.MutableEntry;
-import org.apache.ignite.IgniteCache;
-import org.apache.ignite.configuration.CacheConfiguration;
-import org.apache.ignite.internal.util.typedef.P1;
-import org.apache.ignite.internal.util.typedef.internal.SB;
-import org.apache.ignite.testframework.GridTestUtils;
-
-import static org.apache.ignite.cache.CacheAtomicWriteOrderMode.PRIMARY;
-import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
-
-/**
- * Tests that offheap entry is not evicted while cache entry is in use.
- */
-public abstract class GridCacheOffHeapTieredEvictionAbstractSelfTest extends GridCacheAbstractSelfTest {
- /** */
- private static final int VALS = 100;
-
- /** */
- private static final int VAL_SIZE = 128;
-
- /** */
- private static final int KEYS = 100;
-
- /** */
- private List<TestValue> vals = new ArrayList<>(VALS);
-
- /** {@inheritDoc} */
- @Override protected int gridCount() {
- return 1;
- }
-
- /** {@inheritDoc} */
- @Override protected long getTestTimeout() {
- return 120 * 1000;
- }
-
- /** {@inheritDoc} */
- @Override protected CacheConfiguration cacheConfiguration(String igniteInstanceName) throws Exception {
- CacheConfiguration ccfg = super.cacheConfiguration(igniteInstanceName);
-
- ccfg.setAtomicWriteOrderMode(PRIMARY);
-
- ccfg.setMemoryMode(OFFHEAP_TIERED);
- ccfg.setNearConfiguration(null);
- ccfg.setOffHeapMaxMemory(0);
-
- return ccfg;
- }
-
- /** {@inheritDoc} */
- @Override protected void beforeTest() throws Exception {
- super.beforeTest();
-
- final IgniteCache<Integer, Object> cache = grid(0).cache(null);
-
- vals = new ArrayList<>(VALS);
-
- for (int i = 0; i < VALS; i++) {
- SB sb = new SB(VAL_SIZE);
-
- char c = Character.forDigit(i, 10);
-
- for (int j = 0; j < VAL_SIZE; j++)
- sb.a(c);
-
- vals.add(new TestValue(sb.toString()));
- }
-
- for (int i = 0; i < KEYS; i++)
- cache.put(i, vals.get(i % vals.size()));
- }
-
- /** {@inheritDoc} */
- @Override protected void afterTest() throws Exception {
- super.afterTest();
-
- vals = null;
- }
-
- /**
- * @return Number of iterations per thread.
- */
- private int iterations() {
- return atomicityMode() == ATOMIC ? 100_000 : 50_000;
- }
-
-
-
- /**
- * @throws Exception If failed.
- */
- public void testPut() throws Exception {
- final IgniteCache<Integer, Object> cache = grid(0).cache(null);
-
- GridTestUtils.runMultiThreaded(new Callable<Void>() {
- @Override public Void call() throws Exception {
- ThreadLocalRandom rnd = ThreadLocalRandom.current();
-
- for (int i = 0; i < iterations(); i++) {
- int key = rnd.nextInt(KEYS);
-
- final TestValue val = vals.get(key % VAL_SIZE);
-
- cache.put(key, val);
-
- if (i % 20_000 == 0 && i > 0)
- info("Done " + i + " out of " + iterations());
- }
-
- return null;
- }
- }, 16, "test");
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testRemove() throws Exception {
- final IgniteCache<Integer, Object> cache = grid(0).cache(null);
-
- GridTestUtils.runMultiThreaded(new Callable<Void>() {
- @Override public Void call() throws Exception {
- ThreadLocalRandom rnd = ThreadLocalRandom.current();
-
- for (int i = 0; i < iterations(); i++) {
- int key = rnd.nextInt(KEYS);
-
- final TestValue val = vals.get(key % VAL_SIZE);
-
- if (rnd.nextBoolean())
- cache.remove(key);
- else
- cache.put(key, val);
- }
-
- return null;
- }
- }, 16, "test");
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testTransform() throws Exception {
- final IgniteCache<Integer, Object> cache = grid(0).cache(null).withKeepBinary();
-
- GridTestUtils.runMultiThreaded(new Callable<Void>() {
- @Override public Void call() throws Exception {
- ThreadLocalRandom rnd = ThreadLocalRandom.current();
-
- for (int i = 0; i < iterations(); i++) {
- int key = rnd.nextInt(KEYS);
-
- final TestValue val = vals.get(key % VAL_SIZE);
-
- TestProcessor c = testClosure(val.val, false);
-
- cache.invoke(key, c);
- }
-
- return null;
- }
- }, 16, "test");
- }
-
- /**
- * @param expVal Expected cache value.
- * @param acceptNull If {@code true} value can be null;
- * @return Predicate.
- */
- protected TestPredicate testPredicate(String expVal, boolean acceptNull) {
- return new TestValuePredicate(expVal, acceptNull);
- }
-
- /**
- * @param expVal Expected cache value.
- * @param acceptNull If {@code true} value can be null;
- * @return Predicate.
- */
- protected TestProcessor testClosure(String expVal, boolean acceptNull) {
- return new TestValueClosure(expVal, acceptNull);
- }
-
- /**
- *
- */
- @SuppressWarnings("PublicInnerClass")
- public static class TestValue {
- /** */
- @SuppressWarnings("PublicField")
- public String val;
-
- /**
- *
- */
- public TestValue() {
- // No-op.
- }
-
- /**
- * @param val Value.
- */
- public TestValue(String val) {
- this.val = val;
- }
- }
-
- /**
- *
- */
- protected abstract static class TestPredicate implements P1<Cache.Entry<Integer, Object>> {
- /** */
- protected String expVal;
-
- /** */
- protected boolean acceptNull;
-
- /**
- * @param expVal Expected value.
- * @param acceptNull If {@code true} value can be null;
- */
- protected TestPredicate(String expVal, boolean acceptNull) {
- this.expVal = expVal;
- this.acceptNull = acceptNull;
- }
-
- /** {@inheritDoc} */
- @Override public final boolean apply(Cache.Entry<Integer, Object> e) {
- assertNotNull(e);
-
- Object val = e.getValue();
-
- if (val == null) {
- if (!acceptNull)
- assertNotNull(val);
-
- return true;
- }
-
- checkValue(val);
-
- return true;
- }
-
- /**
- * @param val Value.
- */
- public abstract void checkValue(Object val);
- }
-
- /**
- *
- */
- @SuppressWarnings("PackageVisibleInnerClass")
- static class TestValuePredicate extends TestPredicate {
- /**
- * @param expVal Expected value.
- * @param acceptNull If {@code true} value can be null;
- */
- TestValuePredicate(String expVal, boolean acceptNull) {
- super(expVal, acceptNull);
- }
-
- /** {@inheritDoc} */
- @Override public void checkValue(Object val) {
- TestValue obj = (TestValue)val;
-
- assertEquals(expVal, obj.val);
- }
- }
-
- /**
- *
- */
- protected abstract static class TestProcessor implements EntryProcessor<Integer, Object, Void>, Serializable {
- /** */
- protected String expVal;
-
- /** */
- protected boolean acceptNull;
-
- /**
- * @param expVal Expected value.
- * @param acceptNull If {@code true} value can be null;
- */
- protected TestProcessor(String expVal, boolean acceptNull) {
- this.expVal = expVal;
- this.acceptNull = acceptNull;
- }
-
- /** {@inheritDoc} */
- @Override public Void process(MutableEntry<Integer, Object> e, Object... args) {
- Object val = e.getValue();
-
- if (val == null) {
- if (!acceptNull)
- assertNotNull(val);
-
- e.setValue(true);
-
- return null;
- }
-
- checkValue(val);
-
- e.setValue(val);
-
- return null;
- }
-
- /**
- * @param val Value.
- */
- public abstract void checkValue(Object val);
- }
-
- /**
- *
- */
- @SuppressWarnings("PackageVisibleInnerClass")
- static class TestValueClosure extends TestProcessor {
- /**
- * @param expVal Expected value.
- * @param acceptNull If {@code true} value can be null;
- */
- TestValueClosure(String expVal, boolean acceptNull) {
- super(expVal, acceptNull);
- }
-
- /** {@inheritDoc} */
- @Override public void checkValue(Object val) {
- TestValue obj = (TestValue)val;
-
- assertEquals(expVal, obj.val);
- }
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapTieredEvictionAtomicSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapTieredEvictionAtomicSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapTieredEvictionAtomicSelfTest.java
deleted file mode 100644
index 1e3c0c2..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapTieredEvictionAtomicSelfTest.java
+++ /dev/null
@@ -1,32 +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 org.apache.ignite.cache.CacheAtomicityMode;
-
-import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
-
-/**
- *
- */
-public class GridCacheOffHeapTieredEvictionAtomicSelfTest extends GridCacheOffHeapTieredEvictionAbstractSelfTest {
- /** {@inheritDoc} */
- @Override protected CacheAtomicityMode atomicityMode() {
- return ATOMIC;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapTieredEvictionSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapTieredEvictionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapTieredEvictionSelfTest.java
deleted file mode 100644
index d4e1df0..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapTieredEvictionSelfTest.java
+++ /dev/null
@@ -1,33 +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 org.apache.ignite.cache.CacheAtomicityMode;
-
-import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-
-/**
- * Test with TRANSACTIONAL cache.
- */
-public class GridCacheOffHeapTieredEvictionSelfTest extends GridCacheOffHeapTieredEvictionAbstractSelfTest {
- /** {@inheritDoc} */
- @SuppressWarnings("RedundantMethodOverride")
- @Override protected CacheAtomicityMode atomicityMode() {
- return TRANSACTIONAL;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapTieredSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapTieredSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapTieredSelfTest.java
deleted file mode 100644
index 67c27a9..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapTieredSelfTest.java
+++ /dev/null
@@ -1,33 +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 org.apache.ignite.cache.CacheAtomicityMode;
-
-import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-
-/**
- *
- */
-public class GridCacheOffHeapTieredSelfTest extends GridCacheOffHeapTieredAbstractSelfTest {
- /** {@inheritDoc} */
- @SuppressWarnings("RedundantMethodOverride")
- @Override protected CacheAtomicityMode atomicityMode() {
- return TRANSACTIONAL;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/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 4a6633b..2b82407 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;
@@ -48,8 +47,6 @@ public class GridCacheOffheapUpdateSelfTest extends GridCommonAbstractTest {
ccfg.setCacheMode(CacheMode.PARTITIONED);
ccfg.setNearConfiguration(null);
ccfg.setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL);
- ccfg.setOffHeapMaxMemory(0);
- ccfg.setMemoryMode(CacheMemoryMode.OFFHEAP_TIERED);
cfg.setCacheConfiguration(ccfg);
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePartitionedGetSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePartitionedGetSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePartitionedGetSelfTest.java
index fab05df..81f22d1 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePartitionedGetSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePartitionedGetSelfTest.java
@@ -90,7 +90,6 @@ public class GridCachePartitionedGetSelfTest extends GridCommonAbstractTest {
cc.setBackups(1);
cc.setRebalanceMode(SYNC);
cc.setWriteSynchronizationMode(FULL_SYNC);
- cc.setEvictSynchronized(false);
cc.setNearConfiguration(null);
return cc;
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePartitionedOffHeapLocalStoreSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePartitionedOffHeapLocalStoreSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePartitionedOffHeapLocalStoreSelfTest.java
deleted file mode 100644
index 8f29158..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePartitionedOffHeapLocalStoreSelfTest.java
+++ /dev/null
@@ -1,44 +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 org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMode;
-
-import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
-import static org.apache.ignite.cache.CacheMode.PARTITIONED;
-
-/**
- *
- */
-public class GridCachePartitionedOffHeapLocalStoreSelfTest extends GridCacheAbstractLocalStoreSelfTest {
- /** {@inheritDoc} */
- @Override protected CacheAtomicityMode getAtomicMode() {
- return ATOMIC;
- }
-
- /** {@inheritDoc} */
- @Override protected CacheMode getCacheMode() {
- return PARTITIONED;
- }
-
- /** {@inheritDoc} */
- @Override protected boolean isOffHeapTieredMode() {
- return true;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePreloadingEvictionsSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePreloadingEvictionsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePreloadingEvictionsSelfTest.java
index c46f6bf..82d9b41 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePreloadingEvictionsSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePreloadingEvictionsSelfTest.java
@@ -81,10 +81,7 @@ public class GridCachePreloadingEvictionsSelfTest extends GridCommonAbstractTest
partCacheCfg.setAffinity(new GridCacheModuloAffinityFunction(1, 1));
partCacheCfg.setWriteSynchronizationMode(FULL_SYNC);
partCacheCfg.setNearConfiguration(null);
- partCacheCfg.setEvictSynchronized(true);
partCacheCfg.setEvictionPolicy(null);
- partCacheCfg.setEvictSynchronizedKeyBufferSize(25);
- partCacheCfg.setEvictMaxOverflowRatio(0.99f);
partCacheCfg.setRebalanceMode(ASYNC);
partCacheCfg.setAtomicityMode(TRANSACTIONAL);
@@ -199,8 +196,8 @@ public class GridCachePreloadingEvictionsSelfTest extends GridCommonAbstractTest
assertTrue(GridTestUtils.waitForCondition(new PA() {
@Override public boolean apply() {
- int size1 = ignite1.cache(null).localSize(CachePeekMode.ALL);
- return size1 != oldSize && size1 == ignite2.cache(null).localSize(CachePeekMode.ALL);
+ int size1 = ignite1.cache(null).localSize(CachePeekMode.ONHEAP);
+ return size1 != oldSize && size1 == ignite2.cache(null).localSize(CachePeekMode.ONHEAP);
}
}, getTestTimeout()));
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/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 d700856..2505c68 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<ClusterNode> 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;
@@ -748,7 +691,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/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReloadSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReloadSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReloadSelfTest.java
index 8814aa5..50bed2a 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReloadSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReloadSelfTest.java
@@ -21,6 +21,7 @@ import java.util.Collections;
import org.apache.ignite.Ignite;
import org.apache.ignite.IgniteCache;
import org.apache.ignite.cache.CacheMode;
+import org.apache.ignite.cache.CachePeekMode;
import org.apache.ignite.cache.eviction.lru.LruEvictionPolicy;
import org.apache.ignite.cache.store.CacheStore;
import org.apache.ignite.cache.store.CacheStoreAdapter;
@@ -82,6 +83,7 @@ public class GridCacheReloadSelfTest extends GridCommonAbstractTest {
plc.setMaxSize(MAX_CACHE_ENTRIES);
cacheCfg.setEvictionPolicy(plc);
+ cacheCfg.setOnheapCacheEnabled(true);
cacheCfg.setNearConfiguration(nearEnabled ? new NearCacheConfiguration() : null);
final CacheStore store = new CacheStoreAdapter<Integer, Integer>() {
@@ -172,7 +174,7 @@ public class GridCacheReloadSelfTest extends GridCommonAbstractTest {
for (int i = 0; i < N_ENTRIES; i++)
load(cache, i, true);
- assertEquals(MAX_CACHE_ENTRIES, cache.size());
+ assertEquals(MAX_CACHE_ENTRIES, cache.size(CachePeekMode.ONHEAP));
}
finally {
stopGrid();
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapPreloadSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapPreloadSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapPreloadSelfTest.java
index 610392a..6979859 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapPreloadSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapPreloadSelfTest.java
@@ -73,7 +73,6 @@ public class GridCacheSwapPreloadSelfTest extends GridCommonAbstractTest {
cacheCfg.setWriteSynchronizationMode(FULL_SYNC);
cacheCfg.setCacheMode(cacheMode);
cacheCfg.setRebalanceMode(SYNC);
- cacheCfg.setEvictSynchronized(false);
cacheCfg.setAtomicityMode(TRANSACTIONAL);
if (cacheMode == PARTITIONED)
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/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 8daf4ca..29ffe87 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,10 +21,9 @@ 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.CachePeekMode;
import org.apache.ignite.cache.eviction.fifo.FifoEvictionPolicy;
import org.apache.ignite.configuration.CacheConfiguration;
import org.apache.ignite.configuration.IgniteConfiguration;
@@ -50,9 +49,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,9 +62,9 @@ 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.setOnheapCacheEnabled(true);
ccfg.setExpiryPolicyFactory(CreatedExpiryPolicy.factoryOf(new Duration(TimeUnit.HOURS, 12)));
cfg.setCacheConfiguration(ccfg);
@@ -80,24 +76,21 @@ public class GridCacheTtlManagerEvictionSelfTest extends GridCommonAbstractTest
* @throws Exception If failed.
*/
public void testLocalEviction() throws Exception {
- checkEviction(CacheMode.LOCAL, CacheMemoryMode.ONHEAP_TIERED);
- checkEviction(CacheMode.LOCAL, CacheMemoryMode.OFFHEAP_TIERED);
+ checkEviction(CacheMode.LOCAL);
}
/**
* @throws Exception If failed.
*/
public void testPartitionedEviction() throws Exception {
- checkEviction(CacheMode.PARTITIONED, CacheMemoryMode.ONHEAP_TIERED);
- checkEviction(CacheMode.PARTITIONED, CacheMemoryMode.OFFHEAP_TIERED);
+ checkEviction(CacheMode.PARTITIONED);
}
/**
* @throws Exception If failed.
*/
public void testReplicatedEviction() throws Exception {
- checkEviction(CacheMode.REPLICATED, CacheMemoryMode.ONHEAP_TIERED);
- checkEviction(CacheMode.REPLICATED, CacheMemoryMode.OFFHEAP_TIERED);
+ checkEviction(CacheMode.REPLICATED);
}
/**
@@ -105,9 +98,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);
@@ -126,12 +118,12 @@ public class GridCacheTtlManagerEvictionSelfTest extends GridCommonAbstractTest
if (log.isTraceEnabled())
cctx.ttl().printMemoryStats();
- final String firstKey = "Some test entry key#0";
+ final String firstKey = "Some test entry key#1";
final String lastKey = "Some test entry key#" + ENTRIES_TO_PUT;
- assertFalse("first key should be evicted", cache.containsKey(firstKey));
+ assertNull("first key should be evicted", cache.localPeek(firstKey, CachePeekMode.ONHEAP));
- assertTrue("last key should NOT be evicted", cache.containsKey(lastKey));
+ assertNotNull("last key should NOT be evicted", cache.localPeek(lastKey, CachePeekMode.ONHEAP));
assertEquals("Ttl Manager should NOT track evicted entries", ENTRIES_LIMIT, cctx.ttl().pendingSize());
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/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 e95cb85..44adc84 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,17 +18,12 @@
package org.apache.ignite.internal.processors.cache;
import java.util.Arrays;
-import java.util.Collections;
-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.OFFHEAP_TIERED;
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_VALUES;
-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;
@@ -36,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);
@@ -61,8 +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);
return ccfg;
@@ -72,40 +62,6 @@ public class GridCacheValueBytesPreloadingSelfTest extends GridCommonAbstractTes
* @throws Exception If failed.
*/
public void testOnHeapTiered() throws Exception {
- memMode = ONHEAP_TIERED;
-
- startGrids(1);
-
- try {
- checkByteArrays();
- }
- finally {
- stopAllGrids();
- }
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testOffHeapTiered() throws Exception {
- memMode = OFFHEAP_TIERED;
-
- startGrids(1);
-
- try {
- checkByteArrays();
- }
- finally {
- stopAllGrids();
- }
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testOffHeapValuesOnly() throws Exception {
- memMode = OFFHEAP_VALUES;
-
startGrids(1);
try {
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractTest.java
index 4b1268a..a43e85b 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractTest.java
@@ -156,6 +156,8 @@ public abstract class IgniteCacheAbstractTest extends GridCommonAbstractTest {
if (cacheMode() == PARTITIONED)
cfg.setBackups(1);
+ cfg.setOnheapCacheEnabled(onheapCacheEnabled());
+
return cfg;
}
@@ -210,9 +212,9 @@ public abstract class IgniteCacheAbstractTest extends GridCommonAbstractTest {
}
/**
- * @return {@code true} if swap should be enabled.
+ * @return {@code True} if on-heap cache is enabled.
*/
- protected boolean swapEnabled() {
+ protected boolean onheapCacheEnabled() {
return false;
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/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/c56c4b8c/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 122e2ec..a9098e8 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
@@ -94,12 +94,10 @@ import org.jetbrains.annotations.Nullable;
import static java.util.concurrent.TimeUnit.MILLISECONDS;
import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_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;
import static org.apache.ignite.cache.CachePeekMode.ALL;
-import static org.apache.ignite.cache.CachePeekMode.BACKUP;
import static org.apache.ignite.cache.CachePeekMode.OFFHEAP;
import static org.apache.ignite.cache.CachePeekMode.ONHEAP;
import static org.apache.ignite.cache.CachePeekMode.PRIMARY;
@@ -3214,7 +3212,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
* @throws Exception If failed.
*/
public void _testDeletedEntriesFlag() throws Exception {
- if (cacheMode() != LOCAL && cacheMode() != REPLICATED && memoryMode() != OFFHEAP_TIERED) {
+ if (cacheMode() != LOCAL && cacheMode() != REPLICATED) {
final int cnt = 3;
IgniteCache<String, Integer> cache = jcache();
@@ -4231,9 +4229,6 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
if (true)
return;
- if (memoryMode() == OFFHEAP_TIERED)
- return;
-
int ttl = 1000;
final ExpiryPolicy expiry = new TouchedExpiryPolicy(new Duration(MILLISECONDS, ttl));
@@ -4513,177 +4508,12 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
}
/**
- * @throws Exception If failed.
- */
- public void testUnswap() throws Exception {
- if (swapEnabled() && !offheapEnabled()) {
- IgniteCache<String, Integer> cache = jcache();
-
- List<String> keys = primaryKeysForCache(3);
-
- String k1 = keys.get(0);
- String k2 = keys.get(1);
- String k3 = keys.get(2);
-
- cache.getAndPut(k1, 1);
- cache.getAndPut(k2, 2);
- cache.getAndPut(k3, 3);
-
- final AtomicInteger swapEvts = new AtomicInteger(0);
- final AtomicInteger unswapEvts = new AtomicInteger(0);
-
- Collection<String> locKeys = new HashSet<>();
-
- if (grid(0).context().cache().cache(cacheName()).context().affinityNode()) {
- Iterable<Cache.Entry<String, Integer>> entries = cache.localEntries(PRIMARY, BACKUP);
-
- for (Cache.Entry<String, Integer> entry : entries)
- locKeys.add(entry.getKey());
-
- info("Local keys (primary + backup): " + locKeys);
- }
-
- for (int i = 0; i < gridCount(); i++)
- grid(i).events().localListen(
- new SwapEvtsLocalListener(swapEvts, unswapEvts), EVT_CACHE_OBJECT_SWAPPED, EVT_CACHE_OBJECT_UNSWAPPED);
-
- cache.localEvict(F.asList(k2, k3));
-
- if (memoryMode() == OFFHEAP_TIERED) {
- assertNotNull(cache.localPeek(k1, ONHEAP, OFFHEAP));
- assertNotNull(cache.localPeek(k2, ONHEAP, OFFHEAP));
- assertNotNull(cache.localPeek(k3, ONHEAP, OFFHEAP));
- }
- else {
- assertNotNull(cache.localPeek(k1, ONHEAP, OFFHEAP));
- assertNull(cache.localPeek(k2, ONHEAP, OFFHEAP));
- assertNull(cache.localPeek(k3, ONHEAP, OFFHEAP));
- }
-
- int cnt = 0;
-
- if (locKeys.contains(k2) && swapEnabled()) {
- assertNull(cache.localPeek(k2, ONHEAP));
-
- cache.localPromote(Collections.singleton(k2));
-
- assertEquals((Integer)2, cache.localPeek(k2, ONHEAP));
-
- if (swapAfterLocalEvict())
- cnt++;
- }
- else {
- cache.localPromote(Collections.singleton(k2));
-
- assertNull(cache.localPeek(k2, ONHEAP));
- }
-
- if (locKeys.contains(k3) && swapEnabled()) {
- assertNull(cache.localPeek(k3, ONHEAP));
-
- cache.localPromote(Collections.singleton(k3));
-
- assertEquals((Integer)3, cache.localPeek(k3, ONHEAP));
-
- if (swapAfterLocalEvict())
- cnt++;
- }
- else {
- cache.localPromote(Collections.singleton(k3));
-
- assertNull(cache.localPeek(k3, ONHEAP));
- }
-
- assertEquals(cnt, swapEvts.get());
- assertEquals(cnt, unswapEvts.get());
-
- cache.localEvict(Collections.singleton(k1));
-
- assertEquals((Integer)1, cache.get(k1));
-
- if (locKeys.contains(k1) && swapAfterLocalEvict())
- cnt++;
-
- assertEquals(cnt, swapEvts.get());
- assertEquals(cnt, unswapEvts.get());
-
- cache.clear();
-
- // Check with multiple arguments.
- cache.getAndPut(k1, 1);
- cache.getAndPut(k2, 2);
- cache.getAndPut(k3, 3);
-
- swapEvts.set(0);
- unswapEvts.set(0);
-
- cache.localEvict(Collections.singleton(k2));
- cache.localEvict(Collections.singleton(k3));
-
- if (memoryMode() == OFFHEAP_TIERED) {
- assertNotNull(cache.localPeek(k1, ONHEAP, OFFHEAP));
- assertNotNull(cache.localPeek(k2, ONHEAP, OFFHEAP));
- assertNotNull(cache.localPeek(k3, ONHEAP, OFFHEAP));
- }
- else {
- assertNotNull(cache.localPeek(k1, ONHEAP, OFFHEAP));
- assertNull(cache.localPeek(k2, ONHEAP, OFFHEAP));
- assertNull(cache.localPeek(k3, ONHEAP, OFFHEAP));
- }
-
- cache.localPromote(F.asSet(k2, k3));
-
- cnt = 0;
-
- if (locKeys.contains(k2) && swapAfterLocalEvict())
- cnt++;
-
- if (locKeys.contains(k3) && swapAfterLocalEvict())
- cnt++;
-
- assertEquals(cnt, swapEvts.get());
- assertEquals(cnt, unswapEvts.get());
- }
- }
-
- /**
- * @param cache Cache.
- * @param k Key,
- */
- private void checkKeyAfterPut(IgniteCache<String, Integer> cache, String k) {
- if (memoryMode() == OFFHEAP_TIERED) {
- assertNotNull(cache.localPeek(k, OFFHEAP));
- assertNull(cache.localPeek(k, ONHEAP));
- }
- else {
- assertNotNull(cache.localPeek(k, ONHEAP));
- assertNull(cache.localPeek(k, OFFHEAP));
- }
- }
-
- /**
* @param cache Cache.
* @param k Key.
*/
private void checkKeyAfterLocalEvict(IgniteCache<String, Integer> cache, String k) {
- switch (memoryMode()) {
- case ONHEAP_TIERED:
- assertNull(cache.localPeek(k, ONHEAP));
- assertEquals(offheapEnabled(), cache.localPeek(k, OFFHEAP) != null);
-
- break;
- case OFFHEAP_TIERED:
- assertNull(cache.localPeek(k, ONHEAP));
- assertNotNull(cache.localPeek(k, OFFHEAP));
-
- break;
- case OFFHEAP_VALUES:
- assertNull(cache.localPeek(k, ONHEAP, OFFHEAP));
-
- break;
- default:
- fail("Unexpected memory mode: " + memoryMode());
- }
+ assertNull(cache.localPeek(k, ONHEAP));
+ assertNotNull(cache.localPeek(k, OFFHEAP));
}
/**
@@ -4817,12 +4647,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
for (int i = 0; i < cnt; i++) {
boolean removed = cache.remove("key" + i);
- // TODO: delete the following check when IGNITE-2590 will be fixed.
- boolean bug2590 = cacheMode() == LOCAL && memoryMode() == OFFHEAP_TIERED
- && concurrency == OPTIMISTIC && isolation == REPEATABLE_READ;
-
- if (!bug2590)
- assertTrue(removed);
+ assertTrue(removed);
}
}
});
@@ -4900,9 +4725,6 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
public void testToMap() throws Exception {
IgniteCache<String, Integer> cache = jcache();
- if (offheapTiered(cache))
- return;
-
cache.put("key1", 1);
cache.put("key2", 2);
@@ -4921,9 +4743,6 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
* @throws Exception If failed.
*/
protected void checkSize(final Collection<String> keys) throws Exception {
- if (memoryMode() == OFFHEAP_TIERED)
- return;
-
if (nearEnabled())
assertEquals(keys.size(), jcache().localSize(CachePeekMode.ALL));
else {
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/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/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerAtomicOffheapTieredTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerAtomicOffheapTieredTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerAtomicOffheapTieredTest.java
deleted file mode 100644
index 69efb84..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerAtomicOffheapTieredTest.java
+++ /dev/null
@@ -1,32 +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 org.apache.ignite.cache.CacheMemoryMode;
-
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
-
-/**
- *
- */
-public class IgniteCacheEntryListenerAtomicOffheapTieredTest extends IgniteCacheEntryListenerAtomicTest {
- /** {@inheritDoc} */
- @Override protected CacheMemoryMode memoryMode() {
- return OFFHEAP_TIERED;
- }
-}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerAtomicOffheapValuesTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerAtomicOffheapValuesTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerAtomicOffheapValuesTest.java
deleted file mode 100644
index 23b1bc0..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerAtomicOffheapValuesTest.java
+++ /dev/null
@@ -1,32 +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 org.apache.ignite.cache.CacheMemoryMode;
-
-import static org.apache.ignite.cache.CacheMemoryMode.*;
-
-/**
- *
- */
-public class IgniteCacheEntryListenerAtomicOffheapValuesTest extends IgniteCacheEntryListenerAtomicTest {
- /** {@inheritDoc} */
- @Override protected CacheMemoryMode memoryMode() {
- return OFFHEAP_VALUES;
- }
-}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/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 f430b5b..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,8 +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.OFFHEAP_TIERED;
-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;
@@ -86,28 +83,14 @@ public class IgniteCacheEntryListenerExpiredEventsTest extends GridCommonAbstrac
* @throws Exception If failed.
*/
public void testExpiredEventAtomic() throws Exception {
- checkExpiredEvents(cacheConfiguration(PARTITIONED, ATOMIC, ONHEAP_TIERED));
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testExpiredEventAtomicOffheap() throws Exception {
- checkExpiredEvents(cacheConfiguration(PARTITIONED, ATOMIC, OFFHEAP_TIERED));
+ checkExpiredEvents(cacheConfiguration(PARTITIONED, ATOMIC));
}
/**
* @throws Exception If failed.
*/
public void testExpiredEventTx() throws Exception {
- checkExpiredEvents(cacheConfiguration(PARTITIONED, TRANSACTIONAL, ONHEAP_TIERED));
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testExpiredEventTxOffheap() throws Exception {
- checkExpiredEvents(cacheConfiguration(PARTITIONED, TRANSACTIONAL, OFFHEAP_TIERED));
+ checkExpiredEvents(cacheConfiguration(PARTITIONED, TRANSACTIONAL));
}
/**
@@ -158,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<Object, Object> cacheConfiguration(
CacheMode cacheMode,
- CacheAtomicityMode atomicityMode,
- CacheMemoryMode memoryMode) {
+ CacheAtomicityMode atomicityMode) {
CacheConfiguration<Object, Object> 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/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerTxOffheapTieredTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerTxOffheapTieredTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerTxOffheapTieredTest.java
deleted file mode 100644
index d552195..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerTxOffheapTieredTest.java
+++ /dev/null
@@ -1,32 +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 org.apache.ignite.cache.CacheMemoryMode;
-
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
-
-/**
- *
- */
-public class IgniteCacheEntryListenerTxOffheapTieredTest extends IgniteCacheEntryListenerTxTest {
- /** {@inheritDoc} */
- @Override protected CacheMemoryMode memoryMode() {
- return OFFHEAP_TIERED;
- }
-}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerTxOffheapValuesTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerTxOffheapValuesTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerTxOffheapValuesTest.java
deleted file mode 100644
index 32555c8..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerTxOffheapValuesTest.java
+++ /dev/null
@@ -1,32 +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 org.apache.ignite.cache.CacheMemoryMode;
-
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_VALUES;
-
-/**
- *
- */
-public class IgniteCacheEntryListenerTxOffheapValuesTest extends IgniteCacheEntryListenerTxTest {
- /** {@inheritDoc} */
- @Override protected CacheMemoryMode memoryMode() {
- return OFFHEAP_VALUES;
- }
-}
[16/17] ignite git commit: IGNITE-4535 - Add option to store
deserialized values on-heap
Posted by ag...@apache.org.
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionManager.java
index 1d7fb9e..26f37a7 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionManager.java
@@ -19,148 +19,46 @@ package org.apache.ignite.internal.processors.cache;
import java.util.ArrayList;
import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
import java.util.HashSet;
-import java.util.Iterator;
-import java.util.LinkedList;
import java.util.List;
import java.util.ListIterator;
import java.util.Map;
import java.util.Set;
-import java.util.UUID;
-import java.util.concurrent.BlockingQueue;
-import java.util.concurrent.ConcurrentMap;
-import java.util.concurrent.LinkedBlockingQueue;
-import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.atomic.AtomicLong;
-import java.util.concurrent.atomic.AtomicReference;
-import java.util.concurrent.locks.Condition;
-import java.util.concurrent.locks.Lock;
-import java.util.concurrent.locks.ReadWriteLock;
-import java.util.concurrent.locks.ReentrantLock;
-import java.util.concurrent.locks.ReentrantReadWriteLock;
import org.apache.ignite.IgniteCheckedException;
-import org.apache.ignite.IgniteException;
-import org.apache.ignite.cache.CacheMode;
import org.apache.ignite.cache.eviction.EvictionFilter;
import org.apache.ignite.cache.eviction.EvictionPolicy;
-import org.apache.ignite.cluster.ClusterNode;
import org.apache.ignite.configuration.CacheConfiguration;
-import org.apache.ignite.events.DiscoveryEvent;
-import org.apache.ignite.events.Event;
-import org.apache.ignite.internal.IgniteFutureCancelledCheckedException;
-import org.apache.ignite.internal.IgniteInternalFuture;
-import org.apache.ignite.internal.IgniteInterruptedCheckedException;
-import org.apache.ignite.internal.cluster.ClusterTopologyCheckedException;
-import org.apache.ignite.internal.managers.eventstorage.GridLocalEventListener;
import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
-import org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtCacheEntry;
-import org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtInvalidPartitionException;
-import org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtLocalPartition;
import org.apache.ignite.internal.processors.cache.transactions.IgniteTxEntry;
import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
-import org.apache.ignite.internal.processors.timeout.GridTimeoutObject;
-import org.apache.ignite.internal.processors.timeout.GridTimeoutObjectAdapter;
-import org.apache.ignite.internal.util.F0;
import org.apache.ignite.internal.util.GridBusyLock;
-import org.apache.ignite.internal.util.GridConcurrentHashSet;
import org.apache.ignite.internal.util.GridUnsafe;
-import org.apache.ignite.internal.util.future.GridFutureAdapter;
-import org.apache.ignite.internal.util.lang.GridMetadataAwareAdapter;
-import org.apache.ignite.internal.util.lang.IgnitePair;
-import org.apache.ignite.internal.util.tostring.GridToStringExclude;
-import org.apache.ignite.internal.util.typedef.C1;
-import org.apache.ignite.internal.util.typedef.CI1;
-import org.apache.ignite.internal.util.typedef.CI2;
-import org.apache.ignite.internal.util.typedef.F;
-import org.apache.ignite.internal.util.typedef.P1;
import org.apache.ignite.internal.util.typedef.X;
-import org.apache.ignite.internal.util.typedef.internal.S;
import org.apache.ignite.internal.util.typedef.internal.U;
-import org.apache.ignite.internal.util.worker.GridWorker;
-import org.apache.ignite.lang.IgniteBiTuple;
import org.apache.ignite.lang.IgniteUuid;
-import org.apache.ignite.thread.IgniteThread;
import org.jetbrains.annotations.Nullable;
-import org.jsr166.ConcurrentHashMap8;
-import org.jsr166.ConcurrentLinkedDeque8;
-import static java.util.concurrent.TimeUnit.MILLISECONDS;
-import static org.apache.ignite.cache.CacheMode.LOCAL;
-import static org.apache.ignite.cache.CacheMode.PARTITIONED;
import static org.apache.ignite.events.EventType.EVT_CACHE_ENTRY_EVICTED;
-import static org.apache.ignite.events.EventType.EVT_NODE_FAILED;
-import static org.apache.ignite.events.EventType.EVT_NODE_JOINED;
-import static org.apache.ignite.events.EventType.EVT_NODE_LEFT;
-import static org.apache.ignite.internal.processors.cache.GridCacheUtils.isNearEnabled;
-import static org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtPartitionState.MOVING;
-import static org.jsr166.ConcurrentLinkedDeque8.Node;
/**
- * TODO GG-11140 (old evictions implementation, now created for near cache, evictions to be reconsidered as part of GG-11140).
+ *
*/
public class GridCacheEvictionManager extends GridCacheManagerAdapter implements CacheEvictionManager {
- /** Attribute name used to queue node in entry metadata. */
- private static final int META_KEY = GridMetadataAwareAdapter.EntryKey.CACHE_EVICTION_MANAGER_KEY.key();
-
/** Eviction policy. */
private EvictionPolicy plc;
/** Eviction filter. */
private EvictionFilter filter;
- /** Eviction buffer. */
- private final ConcurrentLinkedDeque8<EvictionInfo> bufEvictQ = new ConcurrentLinkedDeque8<>();
-
- /** Active eviction futures. */
- private final Map<Long, EvictionFuture> futs = new ConcurrentHashMap8<>();
-
- /** Futures count modification lock. */
- private final Lock futsCntLock = new ReentrantLock();
-
- /** Futures count condition. */
- private final Condition futsCntCond = futsCntLock.newCondition();
-
- /** Active futures count. */
- private volatile int activeFutsCnt;
-
- /** Max active futures count. */
- private int maxActiveFuts;
-
- /** Generator of future IDs. */
- private final AtomicLong idGen = new AtomicLong();
-
- /** Evict backup synchronized flag. */
- private boolean evictSync;
-
- /** Evict near synchronized flag. */
- private boolean nearSync;
-
- /** Flag to hold {@code evictSync || nearSync} result. */
- private boolean evictSyncAgr;
-
/** Policy enabled. */
private boolean plcEnabled;
- /** Backup entries worker. */
- private BackupWorker backupWorker;
-
- /** Backup entries worker thread. */
- private IgniteThread backupWorkerThread;
-
/** Busy lock. */
private final GridBusyLock busyLock = new GridBusyLock();
- /** Stopping flag. */
- private volatile boolean stopping;
-
/** Stopped flag. */
private boolean stopped;
- /** Current future. */
- private final AtomicReference<EvictionFuture> curEvictFut = new AtomicReference<>();
-
/** First eviction flag. */
private volatile boolean firstEvictWarn;
@@ -170,157 +68,21 @@ public class GridCacheEvictionManager extends GridCacheManagerAdapter implements
plc = cctx.isNear() ? cfg.getNearConfiguration().getNearEvictionPolicy() : cfg.getEvictionPolicy();
- plcEnabled = plc != null && cctx.isNear();
+ plcEnabled = plc != null;
filter = cfg.getEvictionFilter();
- if (cfg.getEvictMaxOverflowRatio() < 0)
- throw new IgniteCheckedException("Configuration parameter 'maxEvictOverflowRatio' cannot be negative.");
-
- if (cfg.getEvictSynchronizedKeyBufferSize() < 0)
- throw new IgniteCheckedException("Configuration parameter 'evictSynchronizedKeyBufferSize' cannot be negative.");
-
- if (!cctx.isLocal()) {
- evictSync = cfg.isEvictSynchronized() && !cctx.isNear();
-
- nearSync = isNearEnabled(cctx) && !cctx.isNear() && cfg.isEvictSynchronized();
- }
- else {
- if (cfg.isEvictSynchronized())
- U.warn(log, "Ignored 'evictSynchronized' configuration property for LOCAL cache: " + cctx.namexx());
-
- if (cfg.getNearConfiguration() != null && cfg.isEvictSynchronized())
- U.warn(log, "Ignored 'evictNearSynchronized' configuration property for LOCAL cache: " + cctx.namexx());
- }
-
- if (cctx.isDht() && !nearSync && evictSync && isNearEnabled(cctx))
- throw new IgniteCheckedException("Illegal configuration (may lead to data inconsistency) " +
- "[evictSync=true, evictNearSync=false]");
-
- reportConfigurationProblems();
-
- evictSyncAgr = evictSync || nearSync;
-
- if (evictSync && !cctx.isNear() && plcEnabled) {
- backupWorker = new BackupWorker();
-
- cctx.events().addListener(
- new GridLocalEventListener() {
- @Override public void onEvent(Event evt) {
- assert evt.type() == EVT_NODE_FAILED || evt.type() == EVT_NODE_LEFT ||
- evt.type() == EVT_NODE_JOINED;
-
- DiscoveryEvent discoEvt = (DiscoveryEvent)evt;
-
- // Notify backup worker on each topology change.
- if (cctx.discovery().cacheAffinityNode(discoEvt.eventNode(), cctx.name()))
- backupWorker.addEvent(discoEvt);
- }
- },
- EVT_NODE_FAILED, EVT_NODE_LEFT, EVT_NODE_JOINED);
- }
-
- if (evictSyncAgr) {
- if (cfg.getEvictSynchronizedTimeout() <= 0)
- throw new IgniteCheckedException("Configuration parameter 'evictSynchronousTimeout' should be positive.");
-
- if (cfg.getEvictSynchronizedConcurrencyLevel() <= 0)
- throw new IgniteCheckedException("Configuration parameter 'evictSynchronousConcurrencyLevel' " +
- "should be positive.");
-
- maxActiveFuts = cfg.getEvictSynchronizedConcurrencyLevel();
-
- cctx.io().addHandler(cctx.cacheId(), GridCacheEvictionRequest.class, new CI2<UUID, GridCacheEvictionRequest>() {
- @Override public void apply(UUID nodeId, GridCacheEvictionRequest msg) {
- processEvictionRequest(nodeId, msg);
- }
- });
-
- cctx.io().addHandler(cctx.cacheId(), GridCacheEvictionResponse.class, new CI2<UUID, GridCacheEvictionResponse>() {
- @Override public void apply(UUID nodeId, GridCacheEvictionResponse msg) {
- processEvictionResponse(nodeId, msg);
- }
- });
-
- cctx.events().addListener(
- new GridLocalEventListener() {
- @Override public void onEvent(Event evt) {
- assert evt.type() == EVT_NODE_FAILED || evt.type() == EVT_NODE_LEFT;
-
- DiscoveryEvent discoEvt = (DiscoveryEvent)evt;
-
- for (EvictionFuture fut : futs.values())
- fut.onNodeLeft(discoEvt.eventNode().id());
- }
- },
- EVT_NODE_FAILED, EVT_NODE_LEFT);
- }
-
if (log.isDebugEnabled())
log.debug("Eviction manager started on node: " + cctx.nodeId());
}
- /**
- * Outputs warnings if potential configuration problems are detected.
- */
- private void reportConfigurationProblems() {
- CacheMode mode = cctx.config().getCacheMode();
-
- if (plcEnabled && !cctx.isNear() && mode == PARTITIONED) {
- if (!evictSync) {
- U.warn(log, "Evictions are not synchronized with other nodes in topology " +
- "which provides 2x-3x better performance but may cause data inconsistency if cache store " +
- "is not configured (consider changing 'evictSynchronized' configuration property).",
- "Evictions are not synchronized for cache: " + cctx.namexx());
- }
-
- if (!nearSync && isNearEnabled(cctx)) {
- U.warn(log, "Evictions on primary node are not synchronized with near caches on other nodes " +
- "which provides 2x-3x better performance but may cause data inconsistency (consider changing " +
- "'nearEvictSynchronized' configuration property).",
- "Evictions are not synchronized with near caches on other nodes for cache: " + cctx.namexx());
- }
- }
- }
-
- /** {@inheritDoc} */
- @Override protected void onKernalStart0() throws IgniteCheckedException {
- super.onKernalStart0();
-
- if (plcEnabled && evictSync && !cctx.isNear()) {
- // Add dummy event to worker.
- DiscoveryEvent evt = cctx.discovery().localJoinEvent();
-
- backupWorker.addEvent(evt);
-
- backupWorkerThread = new IgniteThread(backupWorker);
- backupWorkerThread.start();
- }
- }
-
/** {@inheritDoc} */
@Override protected void onKernalStop0(boolean cancel) {
super.onKernalStop0(cancel);
- // Change stopping first.
- stopping = true;
-
busyLock.block();
try {
- // Stop backup worker.
- if (evictSync && !cctx.isNear() && backupWorker != null) {
- backupWorker.cancel();
-
- U.join(
- backupWorkerThread,
- log);
- }
-
- // Cancel all active futures.
- for (EvictionFuture fut : futs.values())
- fut.cancel();
-
if (log.isDebugEnabled())
log.debug("Eviction manager stopped on node: " + cctx.nodeId());
}
@@ -332,42 +94,6 @@ public class GridCacheEvictionManager extends GridCacheManagerAdapter implements
}
/**
- * @return Current size of evict queue.
- */
- public int evictQueueSize() {
- return bufEvictQ.sizex();
- }
-
- /**
- * @param nodeId Sender node ID.
- * @param res Response.
- */
- private void processEvictionResponse(UUID nodeId, GridCacheEvictionResponse res) {
- assert nodeId != null;
- assert res != null;
-
- if (log.isDebugEnabled())
- log.debug("Processing eviction response [node=" + nodeId + ", localNode=" + cctx.nodeId() +
- ", res=" + res + ']');
-
- if (!enterBusy())
- return;
-
- try {
- EvictionFuture fut = futs.get(res.futureId());
-
- if (fut != null)
- fut.onResponse(nodeId, res);
- else if (log.isDebugEnabled())
- log.debug("Eviction future for response is not found [res=" + res + ", node=" + nodeId +
- ", localNode=" + cctx.nodeId() + ']');
- }
- finally {
- busyLock.leaveBusy();
- }
- }
-
- /**
* @return {@code True} if entered busy.
*/
private boolean enterBusy() {
@@ -384,324 +110,6 @@ public class GridCacheEvictionManager extends GridCacheManagerAdapter implements
}
/**
- * @param nodeId Sender node ID.
- * @param req Request.
- */
- private void processEvictionRequest(UUID nodeId, GridCacheEvictionRequest req) {
- assert nodeId != null;
- assert req != null;
-
- if (!enterBusy())
- return;
-
- try {
- if (req.classError() != null) {
- if (log.isDebugEnabled())
- log.debug("Class got undeployed during eviction: " + req.classError());
-
- sendEvictionResponse(nodeId, new GridCacheEvictionResponse(cctx.cacheId(), req.futureId(), true));
-
- return;
- }
-
- AffinityTopologyVersion topVer = lockTopology();
-
- try {
- if (!topVer.equals(req.topologyVersion())) {
- if (log.isDebugEnabled())
- log.debug("Topology version is different [locTopVer=" + topVer +
- ", rmtTopVer=" + req.topologyVersion() + ']');
-
- sendEvictionResponse(nodeId,
- new GridCacheEvictionResponse(cctx.cacheId(), req.futureId(), true));
-
- return;
- }
-
- processEvictionRequest0(nodeId, req);
- }
- finally {
- unlockTopology();
- }
- }
- finally {
- busyLock.leaveBusy();
- }
- }
-
- /**
- * @param nodeId Sender node ID.
- * @param req Request.
- */
- private void processEvictionRequest0(UUID nodeId, GridCacheEvictionRequest req) {
- if (log.isDebugEnabled())
- log.debug("Processing eviction request [node=" + nodeId + ", localNode=" + cctx.nodeId() +
- ", reqSize=" + req.entries().size() + ']');
-
- // Partition -> {{Key, Version}, ...}.
- // Group DHT and replicated cache entries by their partitions.
- Map<Integer, Collection<CacheEvictionEntry>> dhtEntries = new HashMap<>();
-
- Collection<CacheEvictionEntry> nearEntries = new LinkedList<>();
-
- for (CacheEvictionEntry e : req.entries()) {
- boolean near = e.near();
-
- if (!near) {
- // Lock is required.
- Collection<CacheEvictionEntry> col =
- F.addIfAbsent(dhtEntries, cctx.affinity().partition(e.key()),
- new LinkedList<CacheEvictionEntry>());
-
- assert col != null;
-
- col.add(e);
- }
- else
- nearEntries.add(e);
- }
-
- GridCacheEvictionResponse res = new GridCacheEvictionResponse(cctx.cacheId(), req.futureId());
-
- GridCacheVersion obsoleteVer = cctx.versions().next();
-
- // DHT and replicated cache entries.
- for (Map.Entry<Integer, Collection<CacheEvictionEntry>> e : dhtEntries.entrySet()) {
- int part = e.getKey();
-
- boolean locked = lockPartition(part); // Will return false if preloading is disabled.
-
- try {
- for (CacheEvictionEntry t : e.getValue()) {
- KeyCacheObject key = t.key();
- GridCacheVersion ver = t.version();
- boolean near = t.near();
-
- assert !near;
-
- boolean evicted = evictLocally(key, ver, near, obsoleteVer);
-
- if (log.isDebugEnabled())
- log.debug("Evicted key [key=" + key + ", ver=" + ver + ", near=" + near +
- ", evicted=" + evicted +']');
-
- if (locked && evicted)
- // Preloading is in progress, we need to save eviction info.
- saveEvictionInfo(key, ver, part);
-
- if (!evicted)
- res.addRejected(key);
- }
- }
- finally {
- if (locked)
- unlockPartition(part);
- }
- }
-
- // Near entries.
- for (CacheEvictionEntry t : nearEntries) {
- KeyCacheObject key = t.key();
- GridCacheVersion ver = t.version();
- boolean near = t.near();
-
- assert near;
-
- boolean evicted = evictLocally(key, ver, near, obsoleteVer);
-
- if (log.isDebugEnabled())
- log.debug("Evicted key [key=" + key + ", ver=" + ver + ", near=" + near +
- ", evicted=" + evicted +']');
-
- if (!evicted)
- res.addRejected(key);
- }
-
- sendEvictionResponse(nodeId, res);
- }
-
- /**
- * @param nodeId Node ID.
- * @param res Response.
- */
- private void sendEvictionResponse(UUID nodeId, GridCacheEvictionResponse res) {
- try {
- cctx.io().send(nodeId, res, cctx.ioPolicy());
-
- if (log.isDebugEnabled())
- log.debug("Sent eviction response [node=" + nodeId + ", localNode=" + cctx.nodeId() +
- ", res" + res + ']');
- }
- catch (ClusterTopologyCheckedException ignored) {
- if (log.isDebugEnabled())
- log.debug("Failed to send eviction response since initiating node left grid " +
- "[node=" + nodeId + ", localNode=" + cctx.nodeId() + ']');
- }
- catch (IgniteCheckedException e) {
- U.error(log, "Failed to send eviction response to node [node=" + nodeId +
- ", localNode=" + cctx.nodeId() + ", res" + res + ']', e);
- }
- }
-
- /**
- * @param key Key.
- * @param ver Version.
- * @param p Partition ID.
- */
- private void saveEvictionInfo(KeyCacheObject key, GridCacheVersion ver, int p) {
- assert cctx.rebalanceEnabled();
-
- if (!cctx.isNear()) {
- try {
- GridDhtLocalPartition part = cctx.dht().topology().localPartition(p,
- AffinityTopologyVersion.NONE, false);
-
- assert part != null;
-
- part.onEntryEvicted(key, ver);
- }
- catch (GridDhtInvalidPartitionException ignored) {
- if (log.isDebugEnabled())
- log.debug("Partition does not belong to local node [part=" + p +
- ", nodeId" + cctx.localNode().id() + ']');
- }
- }
- else
- assert false : "Failed to save eviction info: " + cctx.namexx();
- }
-
- /**
- * @param p Partition ID.
- * @return {@code True} if partition has been actually locked,
- * {@code false} if preloading is finished or disabled and no lock is needed.
- */
- private boolean lockPartition(int p) {
- if (!cctx.rebalanceEnabled())
- return false;
-
- if (!cctx.isNear()) {
- try {
- GridDhtLocalPartition part = cctx.dht().topology().localPartition(p, AffinityTopologyVersion.NONE,
- false);
-
- if (part != null && part.reserve()) {
- part.lock();
-
- if (part.state() != MOVING) {
- part.unlock();
-
- part.release();
-
- return false;
- }
-
- return true;
- }
- }
- catch (GridDhtInvalidPartitionException ignored) {
- if (log.isDebugEnabled())
- log.debug("Partition does not belong to local node [part=" + p +
- ", nodeId" + cctx.localNode().id() + ']');
- }
- }
-
- // No lock is needed.
- return false;
- }
-
- /**
- * @param p Partition ID.
- */
- private void unlockPartition(int p) {
- if (!cctx.rebalanceEnabled())
- return;
-
- if (!cctx.isNear()) {
- try {
- GridDhtLocalPartition part = cctx.dht().topology().localPartition(p, AffinityTopologyVersion.NONE,
- false);
-
- if (part != null) {
- part.unlock();
-
- part.release();
- }
- }
- catch (GridDhtInvalidPartitionException ignored) {
- if (log.isDebugEnabled())
- log.debug("Partition does not belong to local node [part=" + p +
- ", nodeId" + cctx.localNode().id() + ']');
- }
- }
- }
-
- /**
- * Locks topology (for DHT cache only) and returns its version.
- *
- * @return Topology version after lock.
- */
- private AffinityTopologyVersion lockTopology() {
- if (!cctx.isNear()) {
- cctx.dht().topology().readLock();
-
- return cctx.dht().topology().topologyVersion();
- }
-
- return AffinityTopologyVersion.ZERO;
- }
-
- /**
- * Unlocks topology.
- */
- private void unlockTopology() {
- if (!cctx.isNear())
- cctx.dht().topology().readUnlock();
- }
-
- /**
- * @param key Key to evict.
- * @param ver Entry version on initial node.
- * @param near {@code true} if entry should be evicted from near cache.
- * @param obsoleteVer Obsolete version.
- * @return {@code true} if evicted successfully, {@code false} if could not be evicted.
- */
- private boolean evictLocally(KeyCacheObject key,
- final GridCacheVersion ver,
- boolean near,
- GridCacheVersion obsoleteVer)
- {
- assert key != null;
- assert ver != null;
- assert obsoleteVer != null;
- assert evictSyncAgr;
- assert !cctx.isNear() || cctx.isReplicated();
-
- if (log.isDebugEnabled())
- log.debug("Evicting key locally [key=" + key + ", ver=" + ver + ", obsoleteVer=" + obsoleteVer +
- ", localNode=" + cctx.localNode() + ']');
-
- GridCacheAdapter cache = near ? cctx.dht().near() : cctx.cache();
-
- GridCacheEntryEx entry = cache.peekEx(key);
-
- if (entry == null)
- return true;
-
- try {
- // If entry should be evicted from near cache it can be done safely
- // without any consistency risks. We don't use filter in this case.
- // If entry should be evicted from DHT cache, we do not compare versions
- // as well because versions may change outside the transaction.
- return evict0(cache, entry, obsoleteVer, null, false);
- }
- catch (IgniteCheckedException e) {
- U.error(log, "Failed to evict entry on remote node [key=" + key + ", localNode=" + cctx.nodeId() + ']', e);
-
- return false;
- }
- }
-
- /**
* @param cache Cache from which to evict entry.
* @param entry Entry to evict.
* @param obsoleteVer Obsolete version.
@@ -762,9 +170,6 @@ public class GridCacheEvictionManager extends GridCacheManagerAdapter implements
if (!loc) {
if (cctx.isNear())
return;
-
- if (evictSync)
- return;
}
GridCacheEntryEx e = txEntry.cached();
@@ -781,13 +186,10 @@ public class GridCacheEvictionManager extends GridCacheManagerAdapter implements
}
notifyPolicy(e);
-
- if (evictSyncAgr)
- waitForEvictionFutures();
}
/** {@inheritDoc} */
- @Override public void touch(GridCacheEntryEx e, AffinityTopologyVersion topVer) {
+ @Override public void touch(GridCacheEntryEx e, AffinityTopologyVersion topVer) {
if (e.detached() || e.isInternal())
return;
@@ -802,18 +204,10 @@ public class GridCacheEvictionManager extends GridCacheManagerAdapter implements
if (!plcEnabled)
return;
- // Don't track non-primary entries if evicts are synchronized.
- if (!cctx.isNear() && evictSync && !cctx.affinity().primaryByPartition(cctx.localNode(), e.partition(), topVer))
- return;
-
if (!enterBusy())
return;
try {
- // Wait for futures to finish.
- if (evictSyncAgr)
- waitForEvictionFutures();
-
if (log.isDebugEnabled())
log.debug("Touching entry [entry=" + e + ", localNode=" + cctx.nodeId() + ']');
@@ -825,39 +219,6 @@ public class GridCacheEvictionManager extends GridCacheManagerAdapter implements
}
/**
- * @param e Entry for eviction policy notification.
- */
- private void touch0(GridCacheEntryEx e) {
- assert evictSyncAgr;
- assert plcEnabled;
-
- // Do not wait for futures here since only limited number
- // of entries can be passed to this method.
- notifyPolicy(e);
- }
-
- /**
- * @param entries Entries for eviction policy notification.
- */
- private void touchOnTopologyChange(Iterable<? extends GridCacheEntryEx> entries) {
- assert evictSync;
- assert plcEnabled;
-
- if (log.isDebugEnabled())
- log.debug("Touching entries [entries=" + entries + ", localNode=" + cctx.nodeId() + ']');
-
- for (GridCacheEntryEx e : entries) {
- if (e.key() instanceof GridCacheInternal)
- // Skip internal entry.
- continue;
-
- // Do not wait for futures here since only limited number
- // of entries can be passed to this method.
- notifyPolicy(e);
- }
- }
-
- /**
* Warns on first eviction.
*/
private void warnFirstEvict() {
@@ -870,16 +231,11 @@ public class GridCacheEvictionManager extends GridCacheManagerAdapter implements
}
U.warn(log, "Evictions started (cache may have reached its capacity)." +
- " You may wish to increase 'maxSize' on eviction policy being used for cache: " + cctx.name(),
+ " You may wish to increase 'maxSize' on eviction policy being used for cache: " + cctx.name(),
"Evictions started (cache may have reached its capacity): " + cctx.name());
}
/** {@inheritDoc} */
- @Override public boolean evictSyncOrNearSync() {
- return evictSyncAgr;
- }
-
- /** {@inheritDoc} */
@Override public boolean evict(@Nullable GridCacheEntryEx entry, @Nullable GridCacheVersion obsoleteVer,
boolean explicit, @Nullable CacheEntryPredicate[] filter) throws IgniteCheckedException {
if (entry == null)
@@ -892,51 +248,19 @@ public class GridCacheEvictionManager extends GridCacheManagerAdapter implements
if (!cctx.isNear() && !explicit && !firstEvictWarn)
warnFirstEvict();
- if (evictSyncAgr) {
- assert !cctx.isNear(); // Make sure cache is not NEAR.
+ if (obsoleteVer == null)
+ obsoleteVer = cctx.versions().next();
- if (cctx.affinity().backupsByKey(
- entry.key(),
- cctx.topology().topologyVersion()).contains(cctx.localNode()) &&
- evictSync)
- // Do not track backups if evicts are synchronized.
- return !explicit;
+ // Do not touch entry if not evicted:
+ // 1. If it is call from policy, policy tracks it on its own.
+ // 2. If it is explicit call, entry is touched on tx commit.
+ return evict0(cctx.cache(), entry, obsoleteVer, filter, explicit);
+ }
- try {
- if (!cctx.isAll(entry, filter))
- return false;
-
- if (entry.lockedByAny())
- return false;
-
- // Add entry to eviction queue.
- enqueue(entry, filter);
- }
- catch (GridCacheEntryRemovedException ignored) {
- if (log.isDebugEnabled())
- log.debug("Entry got removed while evicting [entry=" + entry +
- ", localNode=" + cctx.nodeId() + ']');
- }
- }
- else {
- if (obsoleteVer == null)
- obsoleteVer = cctx.versions().next();
-
- // Do not touch entry if not evicted:
- // 1. If it is call from policy, policy tracks it on its own.
- // 2. If it is explicit call, entry is touched on tx commit.
- return evict0(cctx.cache(), entry, obsoleteVer, filter, explicit);
- }
-
- return true;
- }
-
- /** {@inheritDoc} */
- @Override public void batchEvict(Collection<?> keys, @Nullable GridCacheVersion obsoleteVer)
- throws IgniteCheckedException {
- assert !evictSyncAgr;
-
- List<GridCacheEntryEx> locked = new ArrayList<>(keys.size());
+ /** {@inheritDoc} */
+ @Override public void batchEvict(Collection<?> keys, @Nullable GridCacheVersion obsoleteVer)
+ throws IgniteCheckedException {
+ List<GridCacheEntryEx> locked = new ArrayList<>(keys.size());
Set<GridCacheEntryEx> notRmv = null;
@@ -1005,7 +329,7 @@ public class GridCacheEvictionManager extends GridCacheManagerAdapter implements
}
finally {
// Unlock entries in reverse order.
- for (ListIterator<GridCacheEntryEx> it = locked.listIterator(locked.size()); it.hasPrevious();) {
+ for (ListIterator<GridCacheEntryEx> it = locked.listIterator(locked.size()); it.hasPrevious(); ) {
GridCacheEntryEx e = it.previous();
GridUnsafe.monitorExit(e);
@@ -1031,332 +355,6 @@ public class GridCacheEvictionManager extends GridCacheManagerAdapter implements
}
/**
- * Enqueues entry for synchronized eviction.
- *
- * @param entry Entry.
- * @param filter Filter.
- * @throws GridCacheEntryRemovedException If entry got removed.
- */
- private void enqueue(GridCacheEntryEx entry, CacheEntryPredicate[] filter)
- throws GridCacheEntryRemovedException {
- Node<EvictionInfo> node = entry.meta(META_KEY);
-
- if (node == null) {
- node = bufEvictQ.addLastx(new EvictionInfo(entry, entry.version(), filter));
-
- if (entry.putMetaIfAbsent(META_KEY, node) != null)
- // Was concurrently added, need to clear it from queue.
- bufEvictQ.unlinkx(node);
- else if (log.isDebugEnabled())
- log.debug("Added entry to eviction queue: " + entry);
- }
- }
-
- /**
- * Checks eviction queue.
- */
- private void checkEvictionQueue() {
- int maxSize = maxQueueSize();
-
- int bufSize = bufEvictQ.sizex();
-
- if (bufSize >= maxSize) {
- if (log.isDebugEnabled())
- log.debug("Processing eviction queue: " + bufSize);
-
- Collection<EvictionInfo> evictInfos = new ArrayList<>(bufSize);
-
- for (int i = 0; i < bufSize; i++) {
- EvictionInfo info = bufEvictQ.poll();
-
- if (info == null)
- break;
-
- evictInfos.add(info);
- }
-
- if (!evictInfos.isEmpty())
- addToCurrentFuture(evictInfos);
- }
- }
-
- /**
- * @return Max queue size.
- */
- private int maxQueueSize() {
- int size = (int)(cctx.cache().size() * cctx.config().getEvictMaxOverflowRatio()) / 100;
-
- if (size <= 0)
- size = 500;
-
- return Math.min(size, cctx.config().getEvictSynchronizedKeyBufferSize());
- }
-
- /**
- * Processes eviction queue (sends required requests, etc.).
- *
- * @param evictInfos Eviction information to create future with.
- */
- private void addToCurrentFuture(Collection<EvictionInfo> evictInfos) {
- assert !evictInfos.isEmpty();
-
- while (true) {
- EvictionFuture fut = curEvictFut.get();
-
- if (fut == null) {
- curEvictFut.compareAndSet(null, new EvictionFuture());
-
- continue;
- }
-
- if (fut.prepareLock()) {
- boolean added;
-
- try {
- added = fut.add(evictInfos);
- }
- finally {
- fut.prepareUnlock();
- }
-
- if (added) {
- if (fut.prepare()) {
- // Thread that prepares future should remove it and install listener.
- curEvictFut.compareAndSet(fut, null);
-
- fut.listen(new CI1<IgniteInternalFuture<?>>() {
- @Override public void apply(IgniteInternalFuture<?> f) {
- if (!enterBusy()) {
- if (log.isDebugEnabled())
- log.debug("Will not notify eviction future completion (grid is stopping): " +
- f);
-
- return;
- }
-
- try {
- AffinityTopologyVersion topVer = lockTopology();
-
- try {
- onFutureCompleted((EvictionFuture)f, topVer);
- }
- finally {
- unlockTopology();
- }
- }
- finally {
- busyLock.leaveBusy();
- }
- }
- });
- }
-
- break;
- }
- else
- // Infos were not added, create another future for next iteration.
- curEvictFut.compareAndSet(fut, new EvictionFuture());
- }
- else
- // Future has not been locked, create another future for next iteration.
- curEvictFut.compareAndSet(fut, new EvictionFuture());
- }
- }
-
- /**
- * @param fut Completed eviction future.
- * @param topVer Topology version on future complete.
- */
- private void onFutureCompleted(EvictionFuture fut, AffinityTopologyVersion topVer) {
- if (!enterBusy())
- return;
-
- try {
- IgniteBiTuple<Collection<EvictionInfo>, Collection<EvictionInfo>> t;
-
- try {
- t = fut.get();
- }
- catch (IgniteFutureCancelledCheckedException ignored) {
- assert false : "Future has been cancelled, but manager is not stopping: " + fut;
-
- return;
- }
- catch (IgniteCheckedException e) {
- U.error(log, "Eviction future finished with error (all entries will be touched): " + fut, e);
-
- if (plcEnabled) {
- for (EvictionInfo info : fut.entries())
- touch0(info.entry());
- }
-
- return;
- }
-
- // Check if topology version is different.
- if (!fut.topologyVersion().equals(topVer)) {
- if (log.isDebugEnabled())
- log.debug("Topology has changed, all entries will be touched: " + fut);
-
- if (plcEnabled) {
- for (EvictionInfo info : fut.entries())
- touch0(info.entry());
- }
-
- return;
- }
-
- // Evict remotely evicted entries.
- GridCacheVersion obsoleteVer = null;
-
- Collection<EvictionInfo> evictedEntries = t.get1();
-
- for (EvictionInfo info : evictedEntries) {
- GridCacheEntryEx entry = info.entry();
-
- try {
- // Remove readers on which the entry was evicted.
- for (IgniteBiTuple<ClusterNode, Long> r : fut.evictedReaders(entry.key())) {
- UUID readerId = r.get1().id();
- Long msgId = r.get2();
-
- ((GridDhtCacheEntry)entry).removeReader(readerId, msgId);
- }
-
- if (obsoleteVer == null)
- obsoleteVer = cctx.versions().next();
-
- // Do not touch primary entries, if not evicted.
- // They will be touched within updating transactions.
- evict0(cctx.cache(), entry, obsoleteVer, versionFilter(info), false);
- }
- catch (IgniteCheckedException e) {
- U.error(log, "Failed to evict entry [entry=" + entry +
- ", localNode=" + cctx.nodeId() + ']', e);
- }
- catch (GridCacheEntryRemovedException ignored) {
- if (log.isDebugEnabled())
- log.debug("Entry was concurrently removed while evicting [entry=" + entry +
- ", localNode=" + cctx.nodeId() + ']');
- }
- }
-
- Collection<EvictionInfo> rejectedEntries = t.get2();
-
- // Touch remotely rejected entries (only if policy is enabled).
- if (plcEnabled && !rejectedEntries.isEmpty()) {
- for (EvictionInfo info : rejectedEntries)
- touch0(info.entry());
- }
- }
- finally {
- busyLock.leaveBusy();
-
- // Signal on future completion.
- signal();
- }
- }
-
- /**
- * This method should be called when eviction future is processed
- * and unwind may continue.
- */
- private void signal() {
- futsCntLock.lock();
-
- try {
- // Avoid volatile read on assertion.
- int cnt = --activeFutsCnt;
-
- assert cnt >= 0 : "Invalid futures count: " + cnt;
-
- if (cnt < maxActiveFuts)
- futsCntCond.signalAll();
- }
- finally {
- futsCntLock.unlock();
- }
- }
-
- /**
- * @param info Eviction info.
- * @return Version aware filter.
- */
- private CacheEntryPredicate[] versionFilter(final EvictionInfo info) {
- // If version has changed since we started the whole process
- // then we should not evict entry.
- return new CacheEntryPredicate[]{new CacheEntryPredicateAdapter() {
- @Override public boolean apply(GridCacheEntryEx e) {
- try {
- GridCacheVersion ver = e.version();
-
- return info.version().equals(ver) && F.isAll(info.filter());
- }
- catch (GridCacheEntryRemovedException ignored) {
- return false;
- }
- }
- }};
- }
-
- /**
- * Gets a collection of nodes to send eviction requests to.
- *
- *
- * @param entry Entry.
- * @param topVer Topology version.
- * @return Tuple of two collections: dht (in case of partitioned cache) nodes
- * and readers (empty for replicated cache).
- * @throws GridCacheEntryRemovedException If entry got removed during method
- * execution.
- */
- @SuppressWarnings( {"IfMayBeConditional"})
- private IgniteBiTuple<Collection<ClusterNode>, Collection<ClusterNode>> remoteNodes(GridCacheEntryEx entry,
- AffinityTopologyVersion topVer)
- throws GridCacheEntryRemovedException {
- assert entry != null;
-
- assert cctx.config().getCacheMode() != LOCAL;
-
- Collection<ClusterNode> backups;
-
- if (evictSync)
- backups = F.view(cctx.dht().topology().nodes(entry.partition(), topVer), F0.notEqualTo(cctx.localNode()));
- else
- backups = Collections.emptySet();
-
- Collection<ClusterNode> readers;
-
- if (nearSync) {
- readers = F.transform(((GridDhtCacheEntry)entry).readers(), new C1<UUID, ClusterNode>() {
- @Nullable @Override public ClusterNode apply(UUID nodeId) {
- return cctx.node(nodeId);
- }
- });
- }
- else
- readers = Collections.emptySet();
-
- return new IgnitePair<>(backups, readers);
- }
-
- /** {@inheritDoc} */
- @Override public void unwind() {
- if (!evictSyncAgr)
- return;
-
- if (!enterBusy())
- return;
-
- try {
- checkEvictionQueue();
- }
- finally {
- busyLock.leaveBusy();
- }
- }
-
- /**
* @param e Entry to notify eviction policy.
*/
@SuppressWarnings({"IfMayBeConditional", "RedundantIfStatement"})
@@ -1372,731 +370,10 @@ public class GridCacheEvictionManager extends GridCacheManagerAdapter implements
plc.onEntryAccessed(e.obsoleteOrDeleted(), e.wrapEviction());
}
- /**
- *
- */
- @SuppressWarnings("TooBroadScope")
- private void waitForEvictionFutures() {
- if (activeFutsCnt >= maxActiveFuts) {
- boolean interrupted = false;
-
- futsCntLock.lock();
-
- try {
- while(!stopping && activeFutsCnt >= maxActiveFuts) {
- try {
- futsCntCond.await(2000, MILLISECONDS);
- }
- catch (InterruptedException ignored) {
- interrupted = true;
- }
- }
- }
- finally {
- futsCntLock.unlock();
-
- if (interrupted)
- Thread.currentThread().interrupt();
- }
- }
- }
-
- /**
- * Prints out eviction stats.
- */
- public void printStats() {
- X.println("Eviction stats [igniteInstanceName=" + cctx.igniteInstanceName() +
- ", cache=" + cctx.cache().name() + ", buffEvictQ=" + bufEvictQ.sizex() + ']');
- }
-
/** {@inheritDoc} */
@Override public void printMemoryStats() {
X.println(">>> ");
X.println(">>> Eviction manager memory stats [igniteInstanceName=" + cctx.igniteInstanceName() +
", cache=" + cctx.name() + ']');
- X.println(">>> buffEvictQ size: " + bufEvictQ.sizex());
- X.println(">>> futsSize: " + futs.size());
- X.println(">>> futsCreated: " + idGen.get());
- }
-
- /**
- *
- */
- private class BackupWorker extends GridWorker {
- /** */
- private final BlockingQueue<DiscoveryEvent> evts = new LinkedBlockingQueue<>();
-
- /** */
- private final Collection<Integer> primaryParts = new HashSet<>();
-
- /**
- *
- */
- private BackupWorker() {
- super(cctx.igniteInstanceName(), "cache-eviction-backup-worker", GridCacheEvictionManager.this.log);
-
- assert plcEnabled;
- }
-
- /**
- * @param evt New event.
- */
- void addEvent(DiscoveryEvent evt) {
- assert evt != null;
-
- evts.add(evt);
- }
-
- /** {@inheritDoc} */
- @Override protected void body() throws InterruptedException, IgniteInterruptedCheckedException {
- try {
- assert !cctx.isNear() && evictSync;
-
- ClusterNode loc = cctx.localNode();
-
- AffinityTopologyVersion initTopVer =
- new AffinityTopologyVersion(cctx.discovery().localJoinEvent().topologyVersion(), 0);
-
- AffinityTopologyVersion cacheStartVer = cctx.startTopologyVersion();
-
- if (cacheStartVer != null && cacheStartVer.compareTo(initTopVer) > 0)
- initTopVer = cacheStartVer;
-
- // Initialize.
- primaryParts.addAll(cctx.affinity().primaryPartitions(cctx.localNodeId(), initTopVer));
-
- while (!isCancelled()) {
- DiscoveryEvent evt = evts.take();
-
- if (log.isDebugEnabled())
- log.debug("Processing event: " + evt);
-
- AffinityTopologyVersion topVer = new AffinityTopologyVersion(evt.topologyVersion());
-
- // Remove partitions that are no longer primary.
- for (Iterator<Integer> it = primaryParts.iterator(); it.hasNext();) {
- if (!evts.isEmpty())
- break;
-
- if (!cctx.affinity().primaryByPartition(loc, it.next(), topVer))
- it.remove();
- }
-
- // Move on to next event.
- if (!evts.isEmpty())
- continue;
-
- for (GridDhtLocalPartition part : cctx.topology().localPartitions()) {
- if (!evts.isEmpty())
- break;
-
- if (part.primary(topVer) && primaryParts.add(part.id())) {
- if (log.isDebugEnabled())
- log.debug("Touching partition entries: " + part);
-
- touchOnTopologyChange(part.allEntries());
- }
- }
- }
- }
- catch (InterruptedException ignored) {
- // No-op.
- }
- catch (IgniteException e) {
- if (!e.hasCause(InterruptedException.class))
- throw e;
- }
- }
- }
-
- /**
- * Wrapper around an entry to be put into queue.
- */
- private class EvictionInfo {
- /** Cache entry. */
- private GridCacheEntryEx entry;
-
- /** Start version. */
- private GridCacheVersion ver;
-
- /** Filter to pass before entry will be evicted. */
- private CacheEntryPredicate[] filter;
-
- /**
- * @param entry Entry.
- * @param ver Version.
- * @param filter Filter.
- */
- EvictionInfo(GridCacheEntryEx entry, GridCacheVersion ver,
- CacheEntryPredicate[] filter) {
- assert entry != null;
- assert ver != null;
-
- this.entry = entry;
- this.ver = ver;
- this.filter = filter;
- }
-
- /**
- * @return Entry.
- */
- GridCacheEntryEx entry() {
- return entry;
- }
-
- /**
- * @return Version.
- */
- GridCacheVersion version() {
- return ver;
- }
-
- /**
- * @return Filter.
- */
- CacheEntryPredicate[] filter() {
- return filter;
- }
-
- /** {@inheritDoc} */
- @Override public String toString() {
- return S.toString(EvictionInfo.class, this);
- }
- }
-
- /**
- * Future for synchronized eviction. Result is a tuple: {evicted entries, rejected entries}.
- */
- private class EvictionFuture extends GridFutureAdapter<IgniteBiTuple<Collection<EvictionInfo>,
- Collection<EvictionInfo>>> {
- /** */
- private static final long serialVersionUID = 0L;
-
- /** */
- private final long id = idGen.incrementAndGet();
-
- /** */
- private ConcurrentLinkedDeque8<EvictionInfo> evictInfos = new ConcurrentLinkedDeque8<>();
-
- /** */
- private final ConcurrentMap<KeyCacheObject, EvictionInfo> entries = new ConcurrentHashMap8<>();
-
- /** */
- private final ConcurrentMap<KeyCacheObject, Collection<ClusterNode>> readers =
- new ConcurrentHashMap8<>();
-
- /** */
- private final Collection<EvictionInfo> evictedEntries = new GridConcurrentHashSet<>();
-
- /** */
- private final ConcurrentMap<KeyCacheObject, EvictionInfo> rejectedEntries = new ConcurrentHashMap8<>();
-
- /** Request map. */
- private final ConcurrentMap<UUID, GridCacheEvictionRequest> reqMap =
- new ConcurrentHashMap8<>();
-
- /** Response map. */
- private final ConcurrentMap<UUID, GridCacheEvictionResponse> resMap =
- new ConcurrentHashMap8<>();
-
- /** To make sure that future is completing within a single thread. */
- private final AtomicBoolean finishPrepare = new AtomicBoolean();
-
- /** Lock to use when future is being initialized. */
- @GridToStringExclude
- private final ReadWriteLock prepareLock = new ReentrantReadWriteLock();
-
- /** To make sure that future is completing within a single thread. */
- private final AtomicBoolean completing = new AtomicBoolean();
-
- /** Lock to use after future is initialized. */
- @GridToStringExclude
- private final ReadWriteLock lock = new ReentrantReadWriteLock();
-
- /** Object to force future completion on elapsing eviction timeout. */
- @GridToStringExclude
- private GridTimeoutObject timeoutObj;
-
- /** Topology version future is processed on. */
- private AffinityTopologyVersion topVer = AffinityTopologyVersion.ZERO;
-
- /**
- * @return {@code True} if prepare lock was acquired.
- */
- boolean prepareLock() {
- return prepareLock.readLock().tryLock();
- }
-
- /**
- *
- */
- void prepareUnlock() {
- prepareLock.readLock().unlock();
- }
-
- /**
- * @param infos Infos to add.
- * @return {@code False} if entries were not added due to capacity restrictions.
- */
- boolean add(Collection<EvictionInfo> infos) {
- assert infos != null && !infos.isEmpty();
-
- if (evictInfos.sizex() > maxQueueSize())
- return false;
-
- evictInfos.addAll(infos);
-
- return true;
- }
-
- /**
- * @return {@code True} if future has been prepared by this call.
- */
- @SuppressWarnings("LockAcquiredButNotSafelyReleased")
- boolean prepare() {
- if (evictInfos.sizex() >= maxQueueSize() && finishPrepare.compareAndSet(false, true)) {
- // Lock will never be released intentionally.
- prepareLock.writeLock().lock();
-
- futsCntLock.lock();
-
- try {
- activeFutsCnt++;
- }
- finally {
- futsCntLock.unlock();
- }
-
- // Put future in map.
- futs.put(id, this);
-
- prepare0();
-
- return true;
- }
-
- return false;
- }
-
- /**
- * Prepares future (sends all required requests).
- */
- private void prepare0() {
- if (log.isDebugEnabled())
- log.debug("Preparing eviction future [futId=" + id + ", localNode=" + cctx.nodeId() +
- ", infos=" + evictInfos + ']');
-
- assert evictInfos != null && !evictInfos.isEmpty();
-
- topVer = lockTopology();
-
- try {
- Collection<EvictionInfo> locals = null;
-
- for (EvictionInfo info : evictInfos) {
- // Queue node may have been stored in entry metadata concurrently, but we don't care
- // about it since we are currently processing this entry.
- Node<EvictionInfo> queueNode = info.entry().removeMeta(META_KEY);
-
- if (queueNode != null)
- bufEvictQ.unlinkx(queueNode);
-
- IgniteBiTuple<Collection<ClusterNode>, Collection<ClusterNode>> tup;
-
- try {
- tup = remoteNodes(info.entry(), topVer);
- }
- catch (GridCacheEntryRemovedException ignored) {
- if (log.isDebugEnabled())
- log.debug("Entry got removed while preparing eviction future (ignoring) [entry=" +
- info.entry() + ", nodeId=" + cctx.nodeId() + ']');
-
- continue;
- }
-
- Collection<ClusterNode> entryReaders =
- F.addIfAbsent(readers, info.entry().key(), new GridConcurrentHashSet<ClusterNode>());
-
- assert entryReaders != null;
-
- // Add entry readers so that we could remove them right before local eviction.
- entryReaders.addAll(tup.get2());
-
- Collection<ClusterNode> nodes = F.concat(true, tup.get1(), tup.get2());
-
- if (!nodes.isEmpty()) {
- entries.put(info.entry().key(), info);
-
- // There are remote participants.
- for (ClusterNode node : nodes) {
- GridCacheEvictionRequest req = F.addIfAbsent(reqMap, node.id(),
- new GridCacheEvictionRequest(cctx.cacheId(), id, evictInfos.size(), topVer,
- cctx.deploymentEnabled()));
-
- assert req != null;
-
- req.addKey(info.entry().key(), info.version(), entryReaders.contains(node));
- }
- }
- else {
- if (locals == null)
- locals = new HashSet<>(evictInfos.size(), 1.0f);
-
- // There are no remote participants, need to keep the entry as local.
- locals.add(info);
- }
- }
-
- if (locals != null) {
- // Evict entries without remote participant nodes immediately.
- GridCacheVersion obsoleteVer = cctx.versions().next();
-
- for (EvictionInfo info : locals) {
- if (log.isDebugEnabled())
- log.debug("Evicting key without remote participant nodes: " + info);
-
- try {
- // Touch primary entry (without backup nodes) if not evicted
- // to keep tracking.
- if (!evict0(cctx.cache(), info.entry(), obsoleteVer, versionFilter(info), false) &&
- plcEnabled)
- touch0(info.entry());
- }
- catch (IgniteCheckedException e) {
- U.error(log, "Failed to evict entry: " + info.entry(), e);
- }
- }
- }
-
- // If there were only local entries.
- if (entries.isEmpty()) {
- complete(false);
-
- return;
- }
- }
- finally {
- unlockTopology();
- }
-
- // Send eviction requests.
- for (Map.Entry<UUID, GridCacheEvictionRequest> e : reqMap.entrySet()) {
- UUID nodeId = e.getKey();
-
- GridCacheEvictionRequest req = e.getValue();
-
- if (log.isDebugEnabled())
- log.debug("Sending eviction request [node=" + nodeId + ", req=" + req + ']');
-
- try {
- cctx.io().send(nodeId, req, cctx.ioPolicy());
- }
- catch (ClusterTopologyCheckedException ignored) {
- // Node left the topology.
- onNodeLeft(nodeId);
- }
- catch (IgniteCheckedException ex) {
- U.error(log, "Failed to send eviction request to node [node=" + nodeId + ", req=" + req + ']', ex);
-
- rejectEntries(nodeId);
- }
- }
-
- registerTimeoutObject();
- }
-
- /**
- *
- */
- private void registerTimeoutObject() {
- // Check whether future has not been completed yet.
- if (lock.readLock().tryLock()) {
- try {
- timeoutObj = new GridTimeoutObjectAdapter(cctx.config().getEvictSynchronizedTimeout()) {
- @Override public void onTimeout() {
- complete(true);
- }
- };
-
- cctx.time().addTimeoutObject(timeoutObj);
- }
- finally {
- lock.readLock().unlock();
- }
- }
- }
-
- /**
- * @return Future ID.
- */
- long id() {
- return id;
- }
-
- /**
- * @return Topology version.
- */
- AffinityTopologyVersion topologyVersion() {
- return topVer;
- }
-
- /**
- * @return Keys to readers mapping.
- */
- Map<KeyCacheObject, Collection<ClusterNode>> readers() {
- return readers;
- }
-
- /**
- * @return All entries associated with future that should be evicted (or rejected).
- */
- Collection<EvictionInfo> entries() {
- return entries.values();
- }
-
- /**
- * Reject all entries on behalf of specified node.
- *
- * @param nodeId Node ID.
- */
- private void rejectEntries(UUID nodeId) {
- assert nodeId != null;
-
- if (lock.readLock().tryLock()) {
- try {
- if (log.isDebugEnabled())
- log.debug("Rejecting entries for node: " + nodeId);
-
- GridCacheEvictionRequest req = reqMap.remove(nodeId);
-
- for (CacheEvictionEntry t : req.entries()) {
- EvictionInfo info = entries.get(t.key());
-
- assert info != null;
-
- rejectedEntries.put(t.key(), info);
- }
- }
- finally {
- lock.readLock().unlock();
- }
- }
-
- checkDone();
- }
-
- /**
- * @param nodeId Node id that left the topology.
- */
- void onNodeLeft(UUID nodeId) {
- assert nodeId != null;
-
- if (lock.readLock().tryLock()) {
- try {
- // Stop waiting response from this node.
- reqMap.remove(nodeId);
-
- resMap.remove(nodeId);
- }
- finally {
- lock.readLock().unlock();
- }
-
- checkDone();
- }
- }
-
- /**
- * @param nodeId Sender node ID.
- * @param res Response.
- */
- void onResponse(UUID nodeId, GridCacheEvictionResponse res) {
- assert nodeId != null;
- assert res != null;
-
- if (lock.readLock().tryLock()) {
- try {
- if (log.isDebugEnabled())
- log.debug("Entered to eviction future onResponse() [fut=" + this + ", node=" + nodeId +
- ", res=" + res + ']');
-
- ClusterNode node = cctx.node(nodeId);
-
- if (node != null)
- resMap.put(nodeId, res);
- else
- // Sender node left grid.
- reqMap.remove(nodeId);
- }
- finally {
- lock.readLock().unlock();
- }
-
- if (res.evictError())
- // Complete future, since there was a class loading error on at least one node.
- complete(false);
- else
- checkDone();
- }
- else {
- if (log.isDebugEnabled())
- log.debug("Ignored eviction response [fut=" + this + ", node=" + nodeId + ", res=" + res + ']');
- }
- }
-
- /**
- *
- */
- private void checkDone() {
- if (reqMap.isEmpty() || resMap.keySet().containsAll(reqMap.keySet()))
- complete(false);
- }
-
- /**
- * Completes future.
- *
- * @param timedOut {@code True} if future is being forcibly completed on timeout.
- */
- @SuppressWarnings({"LockAcquiredButNotSafelyReleased"})
- private void complete(boolean timedOut) {
- if (completing.compareAndSet(false, true)) {
- // Lock will never be released intentionally.
- lock.writeLock().lock();
-
- futs.remove(id);
-
- if (timeoutObj != null && !timedOut)
- // If future is timed out, corresponding object is already removed.
- cctx.time().removeTimeoutObject(timeoutObj);
-
- if (log.isDebugEnabled())
- log.debug("Building eviction future result [fut=" + this + ", timedOut=" + timedOut + ']');
-
- boolean err = false;
-
- for (GridCacheEvictionResponse res : resMap.values()) {
- if (res.evictError()) {
- err = true;
-
- break;
- }
- }
-
- if (err) {
- Collection<UUID> ids = F.view(resMap.keySet(), new P1<UUID>() {
- @Override public boolean apply(UUID e) {
- return resMap.get(e).evictError();
- }
- });
-
- assert !ids.isEmpty();
-
- U.warn(log, "Remote node(s) failed to process eviction request " +
- "due to topology changes " +
- "(some backup or remote values maybe lost): " + ids);
- }
-
- if (timedOut)
- U.warn(log, "Timed out waiting for eviction future " +
- "(consider changing 'evictSynchronousTimeout' and 'evictSynchronousConcurrencyLevel' " +
- "configuration parameters).");
-
- if (err || timedOut) {
- // Future has not been completed successfully, all entries should be rejected.
- assert evictedEntries.isEmpty();
-
- rejectedEntries.putAll(entries);
- }
- else {
- // Copy map to filter remotely rejected entries,
- // as they will be touched within corresponding txs.
- Map<KeyCacheObject, EvictionInfo> rejectedEntries0 = new HashMap<>(rejectedEntries);
-
- // Future has been completed successfully - build result.
- for (EvictionInfo info : entries.values()) {
- KeyCacheObject key = info.entry().key();
-
- if (rejectedEntries0.containsKey(key))
- // Was already rejected.
- continue;
-
- boolean rejected = false;
-
- for (GridCacheEvictionResponse res : resMap.values()) {
- if (res.rejectedKeys().contains(key)) {
- // Modify copied map.
- rejectedEntries0.put(key, info);
-
- rejected = true;
-
- break;
- }
- }
-
- if (!rejected)
- evictedEntries.add(info);
- }
- }
-
- // Pass entries that were rejected due to topology changes
- // or due to timeout or class loading issues.
- // Remotely rejected entries will be touched within corresponding txs.
- onDone(F.t(evictedEntries, rejectedEntries.values()));
- }
- }
-
- /**
- * @param key Key.
- * @return Reader nodes on which given key was evicted.
- */
- Collection<IgniteBiTuple<ClusterNode, Long>> evictedReaders(KeyCacheObject key) {
- Collection<ClusterNode> mappedReaders = readers.get(key);
-
- if (mappedReaders == null)
- return Collections.emptyList();
-
- Collection<IgniteBiTuple<ClusterNode, Long>> col = new LinkedList<>();
-
- for (Map.Entry<UUID, GridCacheEvictionResponse> e : resMap.entrySet()) {
- ClusterNode node = cctx.node(e.getKey());
-
- // If node has left or response did not arrive from near node
- // then just skip it.
- if (node == null || !mappedReaders.contains(node))
- continue;
-
- GridCacheEvictionResponse res = e.getValue();
-
- if (!res.rejectedKeys().contains(key))
- col.add(F.t(node, res.messageId()));
- }
-
- return col;
- }
-
- /** {@inheritDoc} */
- @SuppressWarnings("LockAcquiredButNotSafelyReleased")
- @Override public boolean cancel() {
- if (completing.compareAndSet(false, true)) {
- // Lock will never be released intentionally.
- lock.writeLock().lock();
-
- if (timeoutObj != null)
- cctx.time().removeTimeoutObject(timeoutObj);
-
- boolean b = onCancelled();
-
- assert b;
-
- return true;
- }
-
- return false;
- }
-
- /** {@inheritDoc} */
- @Override public String toString() {
- return S.toString(EvictionFuture.class, this);
- }
}
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionRequest.java
deleted file mode 100644
index cb454f8..0000000
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionRequest.java
+++ /dev/null
@@ -1,248 +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.io.Externalizable;
-import java.nio.ByteBuffer;
-import java.util.ArrayList;
-import java.util.Collection;
-import org.apache.ignite.IgniteCheckedException;
-import org.apache.ignite.internal.GridDirectCollection;
-import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
-import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
-import org.apache.ignite.internal.util.tostring.GridToStringInclude;
-import org.apache.ignite.internal.util.typedef.internal.S;
-import org.apache.ignite.plugin.extensions.communication.MessageCollectionItemType;
-import org.apache.ignite.plugin.extensions.communication.MessageReader;
-import org.apache.ignite.plugin.extensions.communication.MessageWriter;
-import org.jetbrains.annotations.NotNull;
-
-/**
- * Cache eviction request.
- */
-public class GridCacheEvictionRequest extends GridCacheMessage implements GridCacheDeployable {
- /** */
- private static final long serialVersionUID = 0L;
-
- /** Future id. */
- private long futId;
-
- /** Entries to clear from near and backup nodes. */
- @GridToStringInclude
- @GridDirectCollection(CacheEvictionEntry.class)
- private Collection<CacheEvictionEntry> entries;
-
- /** Topology version. */
- private AffinityTopologyVersion topVer;
-
- /**
- * Required by {@link Externalizable}.
- */
- public GridCacheEvictionRequest() {
- // No-op.
- }
-
- /**
- * @param cacheId Cache ID.
- * @param futId Future id.
- * @param size Size.
- * @param topVer Topology version.
- * @param addDepInfo Deployment info flag.
- */
- GridCacheEvictionRequest(int cacheId, long futId, int size, @NotNull AffinityTopologyVersion topVer,
- boolean addDepInfo) {
- assert futId > 0;
- assert size > 0;
- assert topVer.topologyVersion() > 0;
-
- this.cacheId = cacheId;
- this.futId = futId;
- this.addDepInfo = addDepInfo;
-
- entries = new ArrayList<>(size);
-
- this.topVer = topVer;
- }
-
- /** {@inheritDoc}
- * @param ctx*/
- @Override public void prepareMarshal(GridCacheSharedContext ctx) throws IgniteCheckedException {
- super.prepareMarshal(ctx);
-
- if (entries != null) {
- GridCacheContext cctx = ctx.cacheContext(cacheId);
-
- for (CacheEvictionEntry e : entries) {
- e.prepareMarshal(cctx);
-
- if (addDepInfo)
- prepareObject(e.key().value(cctx.cacheObjectContext(), false), cctx);
- }
- }
- }
-
- /** {@inheritDoc} */
- @Override public void finishUnmarshal(GridCacheSharedContext ctx, ClassLoader ldr) throws IgniteCheckedException {
- super.finishUnmarshal(ctx, ldr);
-
- if (entries != null) {
- GridCacheContext cctx = ctx.cacheContext(cacheId);
-
- for (CacheEvictionEntry e : entries)
- e.finishUnmarshal(cctx, ldr);
- }
- }
-
- /** {@inheritDoc} */
- @Override public boolean addDeploymentInfo() {
- return addDepInfo;
- }
-
- /**
- * @return Future id.
- */
- long futureId() {
- return futId;
- }
-
- /**
- * @return Entries - {{Key, Version, Boolean (near or not)}, ...}.
- */
- Collection<CacheEvictionEntry> entries() {
- return entries;
- }
-
- /**
- * @return Topology version.
- */
- @Override public AffinityTopologyVersion topologyVersion() {
- return topVer;
- }
-
- /**
- * Add key to request.
- *
- * @param key Key to evict.
- * @param ver Entry version.
- * @param near {@code true} if key should be evicted from near cache.
- */
- void addKey(KeyCacheObject key, GridCacheVersion ver, boolean near) {
- assert key != null;
- assert ver != null;
-
- entries.add(new CacheEvictionEntry(key, ver, near));
- }
-
- /** {@inheritDoc} */
- @Override public boolean ignoreClassErrors() {
- return true;
- }
-
- /** {@inheritDoc} */
- @Override public boolean writeTo(ByteBuffer buf, MessageWriter writer) {
- writer.setBuffer(buf);
-
- if (!super.writeTo(buf, writer))
- return false;
-
- if (!writer.isHeaderWritten()) {
- if (!writer.writeHeader(directType(), fieldsCount()))
- return false;
-
- writer.onHeaderWritten();
- }
-
- switch (writer.state()) {
- case 3:
- if (!writer.writeCollection("entries", entries, MessageCollectionItemType.MSG))
- return false;
-
- writer.incrementState();
-
- case 4:
- if (!writer.writeLong("futId", futId))
- return false;
-
- writer.incrementState();
-
- case 5:
- if (!writer.writeMessage("topVer", topVer))
- return false;
-
- writer.incrementState();
-
- }
-
- return true;
- }
-
- /** {@inheritDoc} */
- @Override public boolean readFrom(ByteBuffer buf, MessageReader reader) {
- reader.setBuffer(buf);
-
- if (!reader.beforeMessageRead())
- return false;
-
- if (!super.readFrom(buf, reader))
- return false;
-
- switch (reader.state()) {
- case 3:
- entries = reader.readCollection("entries", MessageCollectionItemType.MSG);
-
- if (!reader.isLastRead())
- return false;
-
- reader.incrementState();
-
- case 4:
- futId = reader.readLong("futId");
-
- if (!reader.isLastRead())
- return false;
-
- reader.incrementState();
-
- case 5:
- topVer = reader.readMessage("topVer");
-
- if (!reader.isLastRead())
- return false;
-
- reader.incrementState();
-
- }
-
- return reader.afterMessageRead(GridCacheEvictionRequest.class);
- }
-
- /** {@inheritDoc} */
- @Override public short directType() {
- return 14;
- }
-
- /** {@inheritDoc} */
- @Override public byte fieldsCount() {
- return 6;
- }
-
- /** {@inheritDoc} */
- @Override public String toString() {
- return S.toString(GridCacheEvictionRequest.class, this);
- }
-}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionResponse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionResponse.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionResponse.java
deleted file mode 100644
index 69ec09f..0000000
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionResponse.java
+++ /dev/null
@@ -1,225 +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.io.Externalizable;
-import java.nio.ByteBuffer;
-import java.util.Collection;
-import java.util.HashSet;
-import org.apache.ignite.IgniteCheckedException;
-import org.apache.ignite.internal.GridDirectCollection;
-import org.apache.ignite.internal.util.tostring.GridToStringInclude;
-import org.apache.ignite.internal.util.typedef.internal.S;
-import org.apache.ignite.plugin.extensions.communication.MessageCollectionItemType;
-import org.apache.ignite.plugin.extensions.communication.MessageReader;
-import org.apache.ignite.plugin.extensions.communication.MessageWriter;
-
-/**
- * Cache eviction response.
- */
-public class GridCacheEvictionResponse extends GridCacheMessage {
- /** */
- private static final long serialVersionUID = 0L;
-
- /** Future ID. */
- private long futId;
-
- /** Rejected keys. */
- @GridToStringInclude
- @GridDirectCollection(KeyCacheObject.class)
- private Collection<KeyCacheObject> rejectedKeys = new HashSet<>();
-
- /** Flag to indicate whether request processing has finished with error. */
- private boolean err;
-
- /**
- * Required by {@link Externalizable}.
- */
- public GridCacheEvictionResponse() {
- // No-op.
- }
-
- /**
- * @param cacheId Cache ID.
- * @param futId Future ID.
- */
- GridCacheEvictionResponse(int cacheId, long futId) {
- this(cacheId, futId, false);
- }
-
- /**
- * @param cacheId Cache ID.
- * @param futId Future ID.
- * @param err {@code True} if request processing has finished with error.
- */
- GridCacheEvictionResponse(int cacheId, long futId, boolean err) {
- this.cacheId = cacheId;
- this.futId = futId;
- this.err = err;
- }
-
- /** {@inheritDoc}
- * @param ctx*/
- @Override public void prepareMarshal(GridCacheSharedContext ctx) throws IgniteCheckedException {
- super.prepareMarshal(ctx);
-
- prepareMarshalCacheObjects(rejectedKeys, ctx.cacheContext(cacheId));
- }
-
- /** {@inheritDoc} */
- @Override public void finishUnmarshal(GridCacheSharedContext ctx, ClassLoader ldr) throws IgniteCheckedException {
- super.finishUnmarshal(ctx, ldr);
-
- finishUnmarshalCacheObjects(rejectedKeys, ctx.cacheContext(cacheId), ldr);
- }
-
- /** {@inheritDoc} */
- @Override public boolean addDeploymentInfo() {
- return false;
- }
-
- /**
- * @return Future ID.
- */
- long futureId() {
- return futId;
- }
-
- /**
- * @return Rejected keys.
- */
- Collection<KeyCacheObject> rejectedKeys() {
- return rejectedKeys;
- }
-
- /**
- * Add rejected key to response.
- *
- * @param key Evicted key.
- */
- void addRejected(KeyCacheObject key) {
- assert key != null;
-
- rejectedKeys.add(key);
- }
-
- /**
- * @return {@code True} if request processing has finished with error.
- */
- boolean evictError() {
- return err;
- }
-
- /** {@inheritDoc} */
- @Override public boolean ignoreClassErrors() {
- return true;
- }
-
- /** {@inheritDoc} */
- @Override public boolean writeTo(ByteBuffer buf, MessageWriter writer) {
- writer.setBuffer(buf);
-
- if (!super.writeTo(buf, writer))
- return false;
-
- if (!writer.isHeaderWritten()) {
- if (!writer.writeHeader(directType(), fieldsCount()))
- return false;
-
- writer.onHeaderWritten();
- }
-
- switch (writer.state()) {
- case 3:
- if (!writer.writeBoolean("err", err))
- return false;
-
- writer.incrementState();
-
- case 4:
- if (!writer.writeLong("futId", futId))
- return false;
-
- writer.incrementState();
-
- case 5:
- if (!writer.writeCollection("rejectedKeys", rejectedKeys, MessageCollectionItemType.MSG))
- return false;
-
- writer.incrementState();
-
- }
-
- return true;
- }
-
- /** {@inheritDoc} */
- @Override public boolean readFrom(ByteBuffer buf, MessageReader reader) {
- reader.setBuffer(buf);
-
- if (!reader.beforeMessageRead())
- return false;
-
- if (!super.readFrom(buf, reader))
- return false;
-
- switch (reader.state()) {
- case 3:
- err = reader.readBoolean("err");
-
- if (!reader.isLastRead())
- return false;
-
- reader.incrementState();
-
- case 4:
- futId = reader.readLong("futId");
-
- if (!reader.isLastRead())
- return false;
-
- reader.incrementState();
-
- case 5:
- rejectedKeys = reader.readCollection("rejectedKeys", MessageCollectionItemType.MSG);
-
- if (!reader.isLastRead())
- return false;
-
- reader.incrementState();
-
- }
-
- return reader.afterMessageRead(GridCacheEvictionResponse.class);
- }
-
- /** {@inheritDoc} */
- @Override public short directType() {
- return 15;
- }
-
- /** {@inheritDoc} */
- @Override public byte fieldsCount() {
- return 6;
- }
-
- /** {@inheritDoc} */
- @Override public String toString() {
- return S.toString(GridCacheEvictionResponse.class, this);
- }
-}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheIoManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheIoManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheIoManager.java
index 99878ec..fdd29e4 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheIoManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheIoManager.java
@@ -523,20 +523,6 @@ public class GridCacheIoManager extends GridCacheSharedManagerAdapter {
GridCacheContext ctx = cctx.cacheContext(msg.cacheId());
switch (msg.directType()) {
- case 14: {
- GridCacheEvictionRequest req = (GridCacheEvictionRequest)msg;
-
- GridCacheEvictionResponse res = new GridCacheEvictionResponse(
- ctx.cacheId(),
- req.futureId(),
- req.classError() != null
- );
-
- sendResponseOnFailedMessage(nodeId, res, cctx, ctx.ioPolicy());
- }
-
- break;
-
case 30: {
GridDhtLockRequest req = (GridDhtLockRequest)msg;
[07/17] ignite git commit: IGNITE-4535 - Add option to store
deserialized values on-heap
Posted by ag...@apache.org.
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheTxOffheapExpiryPolicyTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheTxOffheapExpiryPolicyTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheTxOffheapExpiryPolicyTest.java
deleted file mode 100644
index c118457..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheTxOffheapExpiryPolicyTest.java
+++ /dev/null
@@ -1,30 +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.expiry;
-
-import org.apache.ignite.cache.CacheMemoryMode;
-
-/**
- *
- */
-public class IgniteCacheTxOffheapExpiryPolicyTest extends IgniteCacheTxExpiryPolicyTest {
- /** {@inheritDoc} */
- @Override protected CacheMemoryMode memoryMode() {
- return CacheMemoryMode.OFFHEAP_TIERED;
- }
-}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheTxReplicatedOffheapExpiryPolicyTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheTxReplicatedOffheapExpiryPolicyTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheTxReplicatedOffheapExpiryPolicyTest.java
deleted file mode 100644
index 1ee7c3c..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheTxReplicatedOffheapExpiryPolicyTest.java
+++ /dev/null
@@ -1,30 +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.expiry;
-
-import org.apache.ignite.cache.CacheMemoryMode;
-
-/**
- *
- */
-public class IgniteCacheTxReplicatedOffheapExpiryPolicyTest extends IgniteCacheTxReplicatedExpiryPolicyTest {
- /** {@inheritDoc} */
- @Override protected CacheMemoryMode memoryMode() {
- return CacheMemoryMode.OFFHEAP_TIERED;
- }
-}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheTxWithStoreOffheapExpiryPolicyTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheTxWithStoreOffheapExpiryPolicyTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheTxWithStoreOffheapExpiryPolicyTest.java
deleted file mode 100644
index 5ffd052..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheTxWithStoreOffheapExpiryPolicyTest.java
+++ /dev/null
@@ -1,30 +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.expiry;
-
-import org.apache.ignite.cache.CacheMemoryMode;
-
-/**
- *
- */
-public class IgniteCacheTxWithStoreOffheapExpiryPolicyTest extends IgniteCacheTxWithStoreExpiryPolicyTest {
- /** {@inheritDoc} */
- @Override protected CacheMemoryMode memoryMode() {
- return CacheMemoryMode.OFFHEAP_TIERED;
- }
-}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalAtomicOffHeapFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalAtomicOffHeapFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalAtomicOffHeapFullApiSelfTest.java
deleted file mode 100644
index cfb0f85..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalAtomicOffHeapFullApiSelfTest.java
+++ /dev/null
@@ -1,42 +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.local;
-
-import org.apache.ignite.cache.CacheAtomicityMode;
-
-import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
-
-/**
- * Tests local cache in atomic mode with values being stored offheap.
- */
-public class GridCacheLocalAtomicOffHeapFullApiSelfTest extends GridCacheLocalOffHeapFullApiSelfTest {
- /** {@inheritDoc} */
- @Override protected CacheAtomicityMode atomicityMode() {
- return ATOMIC;
- }
-
- /** {@inheritDoc} */
- @Override protected boolean txEnabled() {
- return false;
- }
-
- /** {@inheritDoc} */
- @Override protected boolean lockingEnabled() {
- return false;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalAtomicOffHeapTieredFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalAtomicOffHeapTieredFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalAtomicOffHeapTieredFullApiSelfTest.java
deleted file mode 100644
index e7096b1..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalAtomicOffHeapTieredFullApiSelfTest.java
+++ /dev/null
@@ -1,32 +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.local;
-
-import org.apache.ignite.cache.CacheMemoryMode;
-
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
-
-/**
- * Tests local cache in atomic mode with off-heap tiered mode.
- */
-public class GridCacheLocalAtomicOffHeapTieredFullApiSelfTest extends GridCacheLocalAtomicOffHeapFullApiSelfTest{
- /** {@inheritDoc} */
- @Override protected CacheMemoryMode memoryMode() {
- return OFFHEAP_TIERED;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalByteArrayValuesSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalByteArrayValuesSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalByteArrayValuesSelfTest.java
index 11e717d..1ad8d75 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalByteArrayValuesSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalByteArrayValuesSelfTest.java
@@ -31,7 +31,6 @@ import org.apache.ignite.transactions.TransactionConcurrency;
import org.jetbrains.annotations.Nullable;
import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_VALUES;
import static org.apache.ignite.cache.CacheMode.LOCAL;
import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
import static org.apache.ignite.transactions.TransactionConcurrency.OPTIMISTIC;
@@ -48,33 +47,20 @@ public class GridCacheLocalByteArrayValuesSelfTest extends GridCacheAbstractByte
/** Regular cache. */
private static IgniteCache<Integer, Object> cache;
- /** Offheap cache. */
- private static IgniteCache<Integer, Object> cacheOffheap;
-
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration c = super.getConfiguration(igniteInstanceName);
c.getTransactionConfiguration().setTxSerializableEnabled(true);
- CacheConfiguration cc1 = new CacheConfiguration();
-
- cc1.setName(CACHE_REGULAR);
- cc1.setAtomicityMode(TRANSACTIONAL);
- cc1.setCacheMode(LOCAL);
- cc1.setWriteSynchronizationMode(FULL_SYNC);
- cc1.setEvictSynchronized(false);
+ CacheConfiguration ccfg = new CacheConfiguration();
- CacheConfiguration cc2 = new CacheConfiguration();
+ ccfg.setName(CACHE_REGULAR);
+ ccfg.setAtomicityMode(TRANSACTIONAL);
+ ccfg.setCacheMode(LOCAL);
+ ccfg.setWriteSynchronizationMode(FULL_SYNC);
- cc2.setName(CACHE_OFFHEAP);
- cc2.setAtomicityMode(TRANSACTIONAL);
- cc2.setCacheMode(LOCAL);
- cc2.setWriteSynchronizationMode(FULL_SYNC);
- cc2.setMemoryMode(OFFHEAP_VALUES);
- cc2.setOffHeapMaxMemory(100 * 1024 * 1024);
-
- c.setCacheConfiguration(cc1, cc2);
+ c.setCacheConfiguration(ccfg);
return c;
}
@@ -84,7 +70,6 @@ public class GridCacheLocalByteArrayValuesSelfTest extends GridCacheAbstractByte
ignite = startGrid(1);
cache = ignite.cache(CACHE_REGULAR);
- cacheOffheap = ignite.cache(CACHE_OFFHEAP);
}
/** {@inheritDoc} */
@@ -92,7 +77,6 @@ public class GridCacheLocalByteArrayValuesSelfTest extends GridCacheAbstractByte
super.afterTestsStopped();
cache = null;
- cacheOffheap = null;
ignite = null;
}
@@ -116,24 +100,6 @@ public class GridCacheLocalByteArrayValuesSelfTest extends GridCacheAbstractByte
}
/**
- * Check whether offheap cache with byte array entry works correctly in PESSIMISTIC transaction.
- *
- * @throws Exception If failed.
- */
- public void testPessimisticOffheap() throws Exception {
- testTransaction(cacheOffheap, PESSIMISTIC, KEY_1, wrap(1));
- }
-
- /**
- * Check whether offheap cache with byte array entry works correctly in PESSIMISTIC transaction.
- *
- * @throws Exception If failed.
- */
- public void testPessimisticOffheapMixed() throws Exception {
- testTransactionMixed(cacheOffheap, PESSIMISTIC, KEY_1, wrap(1), KEY_2, 1);
- }
-
- /**
* Check whether cache with byte array entry works correctly in OPTIMISTIC transaction.
*
* @throws Exception If failed.
@@ -152,24 +118,6 @@ public class GridCacheLocalByteArrayValuesSelfTest extends GridCacheAbstractByte
}
/**
- * Check whether offheap cache with byte array entry works correctly in OPTIMISTIC transaction.
- *
- * @throws Exception If failed.
- */
- public void testOptimisticOffheap() throws Exception {
- testTransaction(cacheOffheap, OPTIMISTIC, KEY_1, wrap(1));
- }
-
- /**
- * Check whether offheap cache with byte array entry works correctly in OPTIMISTIC transaction.
- *
- * @throws Exception If failed.
- */
- public void testOptimisticOffheapMixed() throws Exception {
- testTransactionMixed(cacheOffheap, OPTIMISTIC, KEY_1, wrap(1), KEY_2, 1);
- }
-
- /**
* Test byte array entry swapping.
*
* @throws Exception If failed.
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalOffHeapFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalOffHeapFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalOffHeapFullApiSelfTest.java
deleted file mode 100644
index 22b3a03..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalOffHeapFullApiSelfTest.java
+++ /dev/null
@@ -1,30 +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.local;
-
-import org.apache.ignite.cache.CacheMemoryMode;
-
-/**
- * Tests local cache with values being stored offheap.
- */
-public class GridCacheLocalOffHeapFullApiSelfTest extends GridCacheLocalFullApiSelfTest {
- /** {@inheritDoc} */
- @Override protected CacheMemoryMode memoryMode() {
- return CacheMemoryMode.OFFHEAP_VALUES;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalOffHeapTieredFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalOffHeapTieredFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalOffHeapTieredFullApiSelfTest.java
deleted file mode 100644
index c6ce9da..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalOffHeapTieredFullApiSelfTest.java
+++ /dev/null
@@ -1,32 +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.local;
-
-import org.apache.ignite.cache.*;
-
-import static org.apache.ignite.cache.CacheMemoryMode.*;
-
-/**
- * Tests local cache with off-heap tired memory mode.
- */
-public class GridCacheLocalOffHeapTieredFullApiSelfTest extends GridCacheLocalOffHeapFullApiSelfTest {
- /** {@inheritDoc} */
- @Override protected CacheMemoryMode memoryMode() {
- return OFFHEAP_TIERED;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/LocalCacheOffHeapAndSwapMetricsSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/LocalCacheOffHeapAndSwapMetricsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/LocalCacheOffHeapAndSwapMetricsSelfTest.java
deleted file mode 100644
index a9fd6cb..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/LocalCacheOffHeapAndSwapMetricsSelfTest.java
+++ /dev/null
@@ -1,463 +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.local;
-
-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.eviction.fifo.FifoEvictionPolicy;
-import org.apache.ignite.configuration.CacheConfiguration;
-import org.apache.ignite.configuration.IgniteConfiguration;
-import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
-
-/**
- *
- */
-public class LocalCacheOffHeapAndSwapMetricsSelfTest extends GridCommonAbstractTest {
- /** Grid count. */
- private static final int GRID_CNT = 1;
-
- /** Keys count. */
- private static final int KEYS_CNT = 1000;
-
- /** Max size. */
- private static final int MAX_SIZE = 100;
-
- /** Entry size. */
- private static final int ENTRY_SIZE = 86; // Calculated as allocated size divided on entries count.
-
- /** Offheap max count. */
- private static final int OFFHEAP_MAX_CNT = KEYS_CNT / 2;
-
- /** Offheap max size. */
- private static final int OFFHEAP_MAX_SIZE = ENTRY_SIZE * OFFHEAP_MAX_CNT;
-
- /** Cache. */
- private IgniteCache<Integer, Integer> cache;
-
- /** {@inheritDoc} */
- @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
- IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
-
- return cfg;
- }
-
- /**
- * @param memoryMode Cache memory mode.
- * @param offHeapSize Max off-heap size.
- * @param swapEnabled Swap enabled.
- */
- private void createCache(CacheMemoryMode memoryMode, int offHeapSize, boolean swapEnabled) {
- CacheConfiguration ccfg = defaultCacheConfiguration();
-
- ccfg.setStatisticsEnabled(true);
-
- ccfg.setCacheMode(CacheMode.LOCAL);
- ccfg.setAtomicityMode(CacheAtomicityMode.ATOMIC);
- ccfg.setMemoryMode(memoryMode);
-
- ccfg.setOffHeapMaxMemory(offHeapSize);
-
- ccfg.setEvictionPolicy(new FifoEvictionPolicy(MAX_SIZE));
-
- cache = grid(0).getOrCreateCache(ccfg);
- }
-
- /** {@inheritDoc} */
- @Override protected void beforeTestsStarted() throws Exception {
- super.beforeTestsStarted();
-
- startGrids(GRID_CNT);
- }
-
- /** {@inheritDoc} */
- @Override protected void afterTestsStopped() throws Exception {
- super.afterTestsStopped();
-
- stopAllGrids();
- }
-
- /** {@inheritDoc} */
- @Override protected void afterTest() throws Exception {
- if (cache != null)
- cache.destroy();
- }
-
- /**
- * @throws Exception if failed.
- */
- public void testOffHeapMetrics() throws Exception {
- fail("https://issues.apache.org/jira/browse/IGNITE-4536");
-
- createCache(CacheMemoryMode.ONHEAP_TIERED, 0, false);
-
- for (int i = 0; i < KEYS_CNT; i++)
- cache.put(i, i);
-
- printStat();
-
- assertEquals(cache.localMetrics().getCacheEvictions(), cache.localMetrics().getOffHeapPuts());
- assertEquals(KEYS_CNT, cache.localMetrics().getOffHeapGets());
- assertEquals(0, cache.localMetrics().getOffHeapHits());
- assertEquals(0f, cache.localMetrics().getOffHeapHitPercentage());
- assertEquals(KEYS_CNT, cache.localMetrics().getOffHeapMisses());
- assertEquals(100f, cache.localMetrics().getOffHeapMissPercentage());
- assertEquals(0, cache.localMetrics().getOffHeapRemovals());
-
- assertEquals(0, cache.localMetrics().getOffHeapEvictions());
- assertEquals(cache.localMetrics().getCacheEvictions(), cache.localMetrics().getOffHeapEntriesCount());
- assertEquals(cache.localMetrics().getCacheEvictions(), cache.localMetrics().getOffHeapPrimaryEntriesCount());
- assertEquals(0, cache.localMetrics().getOffHeapBackupEntriesCount());
-
- for (int i = 0; i < KEYS_CNT; i++)
- cache.get(i);
-
- printStat();
-
- assertEquals(cache.localMetrics().getCacheEvictions(), cache.localMetrics().getOffHeapPuts());
- assertEquals(KEYS_CNT * 2, cache.localMetrics().getOffHeapGets());
- assertEquals(KEYS_CNT, cache.localMetrics().getOffHeapHits());
- assertEquals(100 * KEYS_CNT / (KEYS_CNT * 2.0), cache.localMetrics().getOffHeapHitPercentage(), 0.1);
- assertEquals(KEYS_CNT, cache.localMetrics().getOffHeapMisses());
- assertEquals(100 * KEYS_CNT / (KEYS_CNT * 2.0), cache.localMetrics().getOffHeapMissPercentage(), 0.1);
- assertEquals(KEYS_CNT, cache.localMetrics().getOffHeapRemovals());
-
- assertEquals(0, cache.localMetrics().getOffHeapEvictions());
- assertEquals(KEYS_CNT - MAX_SIZE, cache.localMetrics().getOffHeapEntriesCount());
- assertEquals(KEYS_CNT - MAX_SIZE, cache.localMetrics().getOffHeapPrimaryEntriesCount());
- assertEquals(0, cache.localMetrics().getOffHeapBackupEntriesCount());
-
- for (int i = KEYS_CNT; i < KEYS_CNT * 2; i++)
- cache.get(i);
-
- printStat();
-
- assertEquals(cache.localMetrics().getCacheEvictions(), cache.localMetrics().getOffHeapPuts());
- assertEquals(KEYS_CNT * 3, cache.localMetrics().getOffHeapGets());
- assertEquals(KEYS_CNT, cache.localMetrics().getOffHeapHits());
- assertEquals(100 / 3.0, cache.localMetrics().getOffHeapHitPercentage(), 0.1);
- assertEquals(KEYS_CNT * 2, cache.localMetrics().getOffHeapMisses());
- assertEquals(100 - (100 / 3.0), cache.localMetrics().getOffHeapMissPercentage(), 0.1);
- assertEquals(KEYS_CNT, cache.localMetrics().getOffHeapRemovals());
-
- assertEquals(0, cache.localMetrics().getOffHeapEvictions());
- assertEquals(KEYS_CNT - MAX_SIZE, cache.localMetrics().getOffHeapEntriesCount());
- assertEquals(KEYS_CNT - MAX_SIZE, cache.localMetrics().getOffHeapPrimaryEntriesCount());
- assertEquals(0, cache.localMetrics().getOffHeapBackupEntriesCount());
-
- for (int i = 0; i < KEYS_CNT; i++)
- cache.remove(i);
-
- printStat();
-
- assertEquals(cache.localMetrics().getCacheEvictions(), cache.localMetrics().getOffHeapPuts());
- assertEquals(KEYS_CNT * 4 - MAX_SIZE, cache.localMetrics().getOffHeapGets());
- assertEquals(KEYS_CNT * 2 - MAX_SIZE, cache.localMetrics().getOffHeapHits());
- assertEquals(100 * (KEYS_CNT * 2.0 - MAX_SIZE) / (KEYS_CNT * 4.0 - MAX_SIZE),
- cache.localMetrics().getOffHeapHitPercentage(), 0.1);
- assertEquals(KEYS_CNT * 2, cache.localMetrics().getOffHeapMisses());
- assertEquals(100 * KEYS_CNT * 2.0 / (KEYS_CNT * 4.0 - MAX_SIZE),
- cache.localMetrics().getOffHeapMissPercentage(), 0.1);
- assertEquals(KEYS_CNT * 2 - MAX_SIZE, cache.localMetrics().getOffHeapRemovals());
-
- assertEquals(0, cache.localMetrics().getOffHeapEvictions());
- assertEquals(0, cache.localMetrics().getOffHeapEntriesCount());
- assertEquals(0, cache.localMetrics().getOffHeapPrimaryEntriesCount());
- assertEquals(0, cache.localMetrics().getOffHeapBackupEntriesCount());
- }
-
- /**
- * @throws Exception if failed.
- */
- public void testOffHeapAndSwapMetrics() throws Exception {
- fail("https://issues.apache.org/jira/browse/IGNITE-4536");
-
- createCache(CacheMemoryMode.ONHEAP_TIERED, OFFHEAP_MAX_SIZE, true);
-
- for (int i = 0; i < KEYS_CNT; i++)
- cache.put(i, i);
-
- printStat();
-
- assertEquals(cache.localMetrics().getCacheEvictions(), cache.localMetrics().getOffHeapPuts());
- assertEquals(KEYS_CNT, cache.localMetrics().getOffHeapGets());
- assertEquals(0, cache.localMetrics().getOffHeapHits());
- assertEquals(0f, cache.localMetrics().getOffHeapHitPercentage());
- assertEquals(KEYS_CNT, cache.localMetrics().getOffHeapMisses());
- assertEquals(100f, cache.localMetrics().getOffHeapMissPercentage());
- assertEquals(0, cache.localMetrics().getOffHeapRemovals());
-
- assertEquals(KEYS_CNT - MAX_SIZE - OFFHEAP_MAX_CNT, cache.localMetrics().getOffHeapEvictions());
- assertEquals(OFFHEAP_MAX_CNT, cache.localMetrics().getOffHeapEntriesCount());
- assertEquals(OFFHEAP_MAX_CNT, cache.localMetrics().getOffHeapPrimaryEntriesCount());
- assertEquals(0, cache.localMetrics().getOffHeapBackupEntriesCount());
-
- for (int i = 0; i < KEYS_CNT; i++)
- cache.get(i);
-
- printStat();
-
- assertEquals(cache.localMetrics().getCacheEvictions(), cache.localMetrics().getOffHeapPuts());
- assertEquals(KEYS_CNT * 2, cache.localMetrics().getOffHeapGets());
- assertEquals(0, cache.localMetrics().getOffHeapHits());
- assertEquals(0.0, cache.localMetrics().getOffHeapHitPercentage(), 0.1);
- assertEquals(KEYS_CNT * 2, cache.localMetrics().getOffHeapMisses());
- assertEquals(100.0, cache.localMetrics().getOffHeapMissPercentage(), 0.1);
- assertEquals(0, cache.localMetrics().getOffHeapRemovals());
-
- assertEquals(cache.localMetrics().getCacheEvictions() - OFFHEAP_MAX_CNT, cache.localMetrics().getOffHeapEvictions());
- assertEquals(OFFHEAP_MAX_CNT, cache.localMetrics().getOffHeapEntriesCount());
- assertEquals(OFFHEAP_MAX_CNT, cache.localMetrics().getOffHeapPrimaryEntriesCount());
- assertEquals(0, cache.localMetrics().getOffHeapBackupEntriesCount());
-
- for (int i = KEYS_CNT; i < KEYS_CNT * 2; i++)
- cache.get(i);
-
- printStat();
-
- assertEquals(cache.localMetrics().getCacheEvictions(), cache.localMetrics().getOffHeapPuts());
- assertEquals(KEYS_CNT * 3, cache.localMetrics().getOffHeapGets());
- assertEquals(0, cache.localMetrics().getOffHeapHits());
- assertEquals(0.0, cache.localMetrics().getOffHeapHitPercentage(), 0.1);
- assertEquals(KEYS_CNT * 3, cache.localMetrics().getOffHeapMisses());
- assertEquals(100.0, cache.localMetrics().getOffHeapMissPercentage(), 0.1);
- assertEquals(0, cache.localMetrics().getOffHeapRemovals());
-
- assertEquals(cache.localMetrics().getCacheEvictions() - OFFHEAP_MAX_CNT, cache.localMetrics().getOffHeapEvictions());
- assertEquals(OFFHEAP_MAX_CNT, cache.localMetrics().getOffHeapEntriesCount());
- assertEquals(OFFHEAP_MAX_CNT, cache.localMetrics().getOffHeapPrimaryEntriesCount());
- assertEquals(0, cache.localMetrics().getOffHeapBackupEntriesCount());
-
- for (int i = 0; i < KEYS_CNT; i++)
- cache.remove(i);
-
- printStat();
-
- assertEquals(cache.localMetrics().getCacheEvictions(), cache.localMetrics().getOffHeapPuts());
- assertEquals(KEYS_CNT * 4 - MAX_SIZE, cache.localMetrics().getOffHeapGets());
- assertEquals(OFFHEAP_MAX_CNT, cache.localMetrics().getOffHeapHits());
- assertEquals(100 * OFFHEAP_MAX_CNT / (KEYS_CNT * 4.0 - MAX_SIZE),
- cache.localMetrics().getOffHeapHitPercentage(), 0.1);
- assertEquals(KEYS_CNT * 4 - OFFHEAP_MAX_CNT - MAX_SIZE, cache.localMetrics().getOffHeapMisses());
- assertEquals(100 * (KEYS_CNT * 4 - OFFHEAP_MAX_CNT - MAX_SIZE) / (KEYS_CNT * 4.0 - MAX_SIZE),
- cache.localMetrics().getOffHeapMissPercentage(), 0.1);
- assertEquals(OFFHEAP_MAX_CNT, cache.localMetrics().getOffHeapRemovals());
-
- assertEquals(cache.localMetrics().getCacheEvictions() - OFFHEAP_MAX_CNT, cache.localMetrics().getOffHeapEvictions());
- assertEquals(0, cache.localMetrics().getOffHeapEntriesCount());
- assertEquals(0, cache.localMetrics().getOffHeapPrimaryEntriesCount());
- assertEquals(0, cache.localMetrics().getOffHeapBackupEntriesCount());
- }
-
- /**
- * @throws Exception if failed.
- */
- public void testOffHeapMetricsInOffHeapTiered() throws Exception {
- fail("https://issues.apache.org/jira/browse/IGNITE-4536");
-
- createCache(CacheMemoryMode.OFFHEAP_TIERED, 0, false);
-
- for (int i = 0; i < KEYS_CNT; i++)
- cache.put(i, i);
-
- printStat();
-
- assertEquals(cache.metrics().getCacheEvictions(), cache.metrics().getOffHeapPuts());
- assertEquals(KEYS_CNT, cache.metrics().getOffHeapGets());
- assertEquals(0, cache.metrics().getOffHeapHits());
- assertEquals(0f, cache.metrics().getOffHeapHitPercentage());
- assertEquals(KEYS_CNT, cache.metrics().getOffHeapMisses());
- assertEquals(100f, cache.metrics().getOffHeapMissPercentage());
- assertEquals(0, cache.metrics().getOffHeapRemovals());
-
- assertEquals(0, cache.metrics().getOffHeapEvictions());
- assertEquals(cache.metrics().getCacheEvictions(), cache.metrics().getOffHeapEntriesCount());
- assertEquals(cache.metrics().getCacheEvictions(), cache.metrics().getOffHeapPrimaryEntriesCount());
- assertEquals(0, cache.metrics().getOffHeapBackupEntriesCount());
-
- for (int i = 0; i < KEYS_CNT; i++)
- cache.get(i);
-
- printStat();
-
- assertEquals(cache.metrics().getCacheEvictions(), cache.metrics().getOffHeapGets());
- assertEquals(KEYS_CNT * 2, cache.metrics().getOffHeapGets());
- assertEquals(KEYS_CNT, cache.metrics().getOffHeapHits());
- assertEquals(100 * KEYS_CNT / (KEYS_CNT * 2.0), cache.metrics().getOffHeapHitPercentage(), 0.1);
- assertEquals(KEYS_CNT, cache.metrics().getOffHeapMisses());
- assertEquals(100 * KEYS_CNT / (KEYS_CNT * 2.0), cache.metrics().getOffHeapMissPercentage(), 0.1);
- assertEquals(0, cache.metrics().getOffHeapRemovals());
-
- assertEquals(0, cache.metrics().getOffHeapEvictions());
- assertEquals(KEYS_CNT, cache.metrics().getOffHeapEntriesCount());
- assertEquals(KEYS_CNT, cache.metrics().getOffHeapPrimaryEntriesCount());
- assertEquals(0, cache.metrics().getOffHeapBackupEntriesCount());
-
- for (int i = KEYS_CNT; i < KEYS_CNT * 2; i++)
- cache.get(i);
-
- printStat();
-
- assertEquals(cache.metrics().getCacheEvictions(), cache.metrics().getOffHeapGets());
- assertEquals(KEYS_CNT * 3, cache.metrics().getOffHeapGets());
- assertEquals(KEYS_CNT, cache.metrics().getOffHeapHits());
- assertEquals(100 / 3.0, cache.metrics().getOffHeapHitPercentage(), 0.1);
- assertEquals(KEYS_CNT * 2, cache.metrics().getOffHeapMisses());
- assertEquals(100 - (100 / 3.0), cache.metrics().getOffHeapMissPercentage(), 0.1);
- assertEquals(0, cache.metrics().getOffHeapRemovals());
-
- assertEquals(0, cache.metrics().getOffHeapEvictions());
- assertEquals(KEYS_CNT, cache.metrics().getOffHeapEntriesCount());
- assertEquals(KEYS_CNT, cache.metrics().getOffHeapPrimaryEntriesCount());
- assertEquals(0, cache.metrics().getOffHeapBackupEntriesCount());
-
- for (int i = 0; i < KEYS_CNT; i++)
- cache.remove(i);
-
- printStat();
-
- assertEquals(cache.metrics().getCacheEvictions(), cache.metrics().getOffHeapGets());
- assertEquals(KEYS_CNT * 4, cache.metrics().getOffHeapGets());
- assertEquals(KEYS_CNT * 2, cache.metrics().getOffHeapHits());
- assertEquals(100 * (KEYS_CNT * 2.0) / (KEYS_CNT * 4.0),
- cache.metrics().getOffHeapHitPercentage(), 0.1);
- assertEquals(KEYS_CNT * 2, cache.metrics().getOffHeapMisses());
- assertEquals(100 * KEYS_CNT * 2.0 / (KEYS_CNT * 4.0),
- cache.metrics().getOffHeapMissPercentage(), 0.1);
- assertEquals(KEYS_CNT, cache.metrics().getOffHeapRemovals());
-
- assertEquals(0, cache.metrics().getOffHeapEvictions());
- assertEquals(0, cache.metrics().getOffHeapEntriesCount());
- assertEquals(0, cache.metrics().getOffHeapPrimaryEntriesCount());
- assertEquals(0, cache.metrics().getOffHeapBackupEntriesCount());
- }
-
- /**
- * @throws Exception if failed.
- */
- public void testOffHeapAndSwapMetricsInOffHeapTiered() throws Exception {
- fail("https://issues.apache.org/jira/browse/IGNITE-4536");
-
- createCache(CacheMemoryMode.OFFHEAP_TIERED, OFFHEAP_MAX_SIZE, true);
-
- for (int i = 0; i < KEYS_CNT; i++)
- cache.put(i, i);
-
- printStat();
-
- assertEquals(cache.metrics().getCacheEvictions(), cache.metrics().getOffHeapGets());
- assertEquals(KEYS_CNT, cache.metrics().getOffHeapGets());
- assertEquals(0, cache.metrics().getOffHeapHits());
- assertEquals(0f, cache.metrics().getOffHeapHitPercentage());
- assertEquals(KEYS_CNT, cache.metrics().getOffHeapMisses());
- assertEquals(100f, cache.metrics().getOffHeapMissPercentage());
- assertEquals(0, cache.metrics().getOffHeapRemovals());
-
- assertEquals(KEYS_CNT - OFFHEAP_MAX_CNT, cache.metrics().getOffHeapEvictions());
- assertEquals(OFFHEAP_MAX_CNT, cache.metrics().getOffHeapEntriesCount());
- assertEquals(OFFHEAP_MAX_CNT, cache.metrics().getOffHeapPrimaryEntriesCount());
- assertEquals(0, cache.metrics().getOffHeapBackupEntriesCount());
-
- for (int i = 0; i < KEYS_CNT; i++)
- cache.get(i);
-
- printStat();
-
- assertEquals(cache.metrics().getCacheEvictions(), cache.metrics().getOffHeapPuts());
- assertEquals(KEYS_CNT * 2, cache.metrics().getOffHeapGets());
- assertEquals(0, cache.metrics().getOffHeapHits());
- assertEquals(0.0, cache.metrics().getOffHeapHitPercentage(), 0.1);
- assertEquals(KEYS_CNT * 2, cache.metrics().getOffHeapMisses());
- assertEquals(100.0, cache.metrics().getOffHeapMissPercentage(), 0.1);
- assertEquals(0, cache.metrics().getOffHeapRemovals());
-
- assertEquals(cache.metrics().getCacheEvictions() - OFFHEAP_MAX_CNT, cache.metrics().getOffHeapEvictions());
- assertEquals(OFFHEAP_MAX_CNT, cache.metrics().getOffHeapEntriesCount());
- assertEquals(OFFHEAP_MAX_CNT, cache.metrics().getOffHeapPrimaryEntriesCount());
- assertEquals(0, cache.metrics().getOffHeapBackupEntriesCount());
-
- for (int i = KEYS_CNT; i < KEYS_CNT * 2; i++)
- cache.get(i);
-
- printStat();
-
- assertEquals(cache.metrics().getCacheEvictions(), cache.metrics().getOffHeapGets());
- assertEquals(KEYS_CNT * 3, cache.metrics().getOffHeapGets());
- assertEquals(0, cache.metrics().getOffHeapHits());
- assertEquals(0.0, cache.metrics().getOffHeapHitPercentage(), 0.1);
- assertEquals(KEYS_CNT * 3, cache.metrics().getOffHeapMisses());
- assertEquals(100.0, cache.metrics().getOffHeapMissPercentage(), 0.1);
- assertEquals(0, cache.metrics().getOffHeapRemovals());
-
- assertEquals(cache.metrics().getCacheEvictions() - OFFHEAP_MAX_CNT - KEYS_CNT,
- cache.metrics().getOffHeapEvictions());
- assertEquals(OFFHEAP_MAX_CNT, cache.metrics().getOffHeapEntriesCount());
- assertEquals(OFFHEAP_MAX_CNT, cache.metrics().getOffHeapPrimaryEntriesCount());
- assertEquals(0, cache.metrics().getOffHeapBackupEntriesCount());
-
- for (int i = 0; i < KEYS_CNT; i++)
- cache.remove(i);
-
- printStat();
-
- assertEquals(cache.metrics().getCacheEvictions(), cache.metrics().getOffHeapGets());
- assertEquals(KEYS_CNT * 4, cache.metrics().getOffHeapGets());
- assertEquals(OFFHEAP_MAX_CNT, cache.metrics().getOffHeapHits());
- assertEquals(100 * OFFHEAP_MAX_CNT / (KEYS_CNT * 4.0),
- cache.metrics().getOffHeapHitPercentage(), 0.1);
- assertEquals(KEYS_CNT * 4 - OFFHEAP_MAX_CNT, cache.metrics().getOffHeapMisses());
- assertEquals(100 * (KEYS_CNT * 4 - OFFHEAP_MAX_CNT) / (KEYS_CNT * 4.0),
- cache.metrics().getOffHeapMissPercentage(), 0.1);
- assertEquals(OFFHEAP_MAX_CNT, cache.metrics().getOffHeapRemovals());
-
- assertEquals(cache.metrics().getCacheEvictions() - OFFHEAP_MAX_CNT - 2 * KEYS_CNT, cache.metrics().getOffHeapEvictions());
- assertEquals(0, cache.metrics().getOffHeapEntriesCount());
- assertEquals(0, cache.metrics().getOffHeapPrimaryEntriesCount());
- assertEquals(0, cache.metrics().getOffHeapBackupEntriesCount());
- }
-
- /**
- * Prints stats.
- */
- protected void printStat() {
- System.out.println("!!! -------------------------------------------------------");
- System.out.println("!!! Puts: cache = " + cache.localMetrics().getCachePuts() +
- ", offheap = " + cache.localMetrics().getOffHeapPuts());
- System.out.println("!!! Gets: cache = " + cache.localMetrics().getCacheGets() +
- ", offheap = " + cache.localMetrics().getOffHeapGets());
- System.out.println("!!! Removes: cache = " + cache.localMetrics().getCacheRemovals() +
- ", offheap = " + cache.localMetrics().getOffHeapRemovals());
- System.out.println("!!! Evictions: cache = " + cache.localMetrics().getCacheEvictions() +
- ", offheap = " + cache.localMetrics().getOffHeapEvictions() +
- ", swap = none" );
- System.out.println("!!! Hits: cache = " + cache.localMetrics().getCacheHits() +
- ", offheap = " + cache.localMetrics().getOffHeapHits());
- System.out.println("!!! Hit(%): cache = " + cache.localMetrics().getCacheHitPercentage() +
- ", offheap = " + cache.localMetrics().getOffHeapHitPercentage());
- System.out.println("!!! Misses: cache = " + cache.localMetrics().getCacheMisses() +
- ", offheap = " + cache.localMetrics().getOffHeapMisses());
- System.out.println("!!! Miss(%): cache = " + cache.localMetrics().getCacheMissPercentage() +
- ", offheap = " + cache.localMetrics().getOffHeapMissPercentage());
- System.out.println("!!! Entries: cache = " + cache.localMetrics().getSize() +
- ", offheap = " + cache.localMetrics().getOffHeapEntriesCount());
- System.out.println("!!! Size: cache = none" +
- ", offheap = " + cache.localMetrics().getOffHeapAllocatedSize());
- System.out.println();
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicOffHeapMultiJvmFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicOffHeapMultiJvmFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicOffHeapMultiJvmFullApiSelfTest.java
deleted file mode 100644
index 6b23991..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicOffHeapMultiJvmFullApiSelfTest.java
+++ /dev/null
@@ -1,31 +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.multijvm;
-
-import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheAtomicOffHeapMultiNodeFullApiSelfTest;
-
-/**
- * Multi-JVM tests.
- */
-public class GridCacheAtomicOffHeapMultiJvmFullApiSelfTest extends
- GridCacheAtomicOffHeapMultiNodeFullApiSelfTest {
- /** {@inheritDoc} */
- protected boolean isMultiJvm() {
- return true;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicOffHeapTieredMultiJvmFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicOffHeapTieredMultiJvmFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicOffHeapTieredMultiJvmFullApiSelfTest.java
deleted file mode 100644
index bae0fa0..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicOffHeapTieredMultiJvmFullApiSelfTest.java
+++ /dev/null
@@ -1,36 +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.multijvm;
-
-import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheAtomicOffHeapTieredMultiNodeFullApiSelfTest;
-
-/**
- * Multi-JVM tests.
- */
-public class GridCacheAtomicOffHeapTieredMultiJvmFullApiSelfTest
- extends GridCacheAtomicOffHeapTieredMultiNodeFullApiSelfTest {
- /** {@inheritDoc} */
- protected boolean isMultiJvm() {
- return true;
- }
-
- /** {@inheritDoc} */
- @Override public void testLocalClearKeys() throws Exception {
- fail("https://issues.apache.org/jira/browse/IGNITE-1107");
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicOnheapMultiJvmFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicOnheapMultiJvmFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicOnheapMultiJvmFullApiSelfTest.java
new file mode 100644
index 0000000..2a5c2da
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicOnheapMultiJvmFullApiSelfTest.java
@@ -0,0 +1,28 @@
+/*
+ * 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.multijvm;
+
+import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheAtomicOnheapMultiNodeFullApiSelfTest;
+
+public class GridCacheAtomicOnheapMultiJvmFullApiSelfTest extends GridCacheAtomicOnheapMultiNodeFullApiSelfTest {
+ /** {@inheritDoc} */
+ @Override protected boolean isMultiJvm() {
+ return true;
+ }
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicPrimaryWriteOrderOnheapMultiJvmFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicPrimaryWriteOrderOnheapMultiJvmFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicPrimaryWriteOrderOnheapMultiJvmFullApiSelfTest.java
new file mode 100644
index 0000000..af69e66
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicPrimaryWriteOrderOnheapMultiJvmFullApiSelfTest.java
@@ -0,0 +1,29 @@
+/*
+ * 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.multijvm;
+
+import org.apache.ignite.cache.CacheAtomicWriteOrderMode;
+import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheAtomicPrimaryWriteOrderOnheapMultiNodeFullApiSelfTest;
+
+public class GridCacheAtomicPrimaryWriteOrderOnheapMultiJvmFullApiSelfTest extends GridCacheAtomicPrimaryWriteOrderOnheapMultiNodeFullApiSelfTest {
+ /** {@inheritDoc} */
+ @Override protected CacheAtomicWriteOrderMode atomicWriteOrderMode() {
+ return CacheAtomicWriteOrderMode.PRIMARY;
+ }
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicPrimaryWrityOrderOffHeapMultiJvmFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicPrimaryWrityOrderOffHeapMultiJvmFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicPrimaryWrityOrderOffHeapMultiJvmFullApiSelfTest.java
deleted file mode 100644
index 2222ada..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicPrimaryWrityOrderOffHeapMultiJvmFullApiSelfTest.java
+++ /dev/null
@@ -1,31 +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.multijvm;
-
-import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheAtomicPrimaryWrityOrderOffHeapMultiNodeFullApiSelfTest;
-
-/**
- * Multi-JVM tests.
- */
-public class GridCacheAtomicPrimaryWrityOrderOffHeapMultiJvmFullApiSelfTest extends
- GridCacheAtomicPrimaryWrityOrderOffHeapMultiNodeFullApiSelfTest {
- /** {@inheritDoc} */
- protected boolean isMultiJvm() {
- return true;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicPrimaryWrityOrderOffHeapTieredMultiJvmFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicPrimaryWrityOrderOffHeapTieredMultiJvmFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicPrimaryWrityOrderOffHeapTieredMultiJvmFullApiSelfTest.java
deleted file mode 100644
index 0bfdfea..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicPrimaryWrityOrderOffHeapTieredMultiJvmFullApiSelfTest.java
+++ /dev/null
@@ -1,36 +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.multijvm;
-
-import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheAtomicPrimaryWrityOrderOffHeapTieredMultiNodeFullApiSelfTest;
-
-/**
- * Multi-JVM tests.
- */
-public class GridCacheAtomicPrimaryWrityOrderOffHeapTieredMultiJvmFullApiSelfTest
- extends GridCacheAtomicPrimaryWrityOrderOffHeapTieredMultiNodeFullApiSelfTest {
- /** {@inheritDoc} */
- @Override protected boolean isMultiJvm() {
- return true;
- }
-
- /** {@inheritDoc} */
- @Override public void testLocalClearKeys() throws Exception {
- fail("https://issues.apache.org/jira/browse/IGNITE-1107");
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCachePartitionedNearDisabledAtomicOffHeapTieredMultiJvmFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCachePartitionedNearDisabledAtomicOffHeapTieredMultiJvmFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCachePartitionedNearDisabledAtomicOffHeapTieredMultiJvmFullApiSelfTest.java
deleted file mode 100644
index f5603a2..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCachePartitionedNearDisabledAtomicOffHeapTieredMultiJvmFullApiSelfTest.java
+++ /dev/null
@@ -1,36 +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.multijvm;
-
-import org.apache.ignite.internal.processors.cache.distributed.dht.GridCachePartitionedNearDisabledAtomicOffHeapTieredMultiNodeFullApiSelfTest;
-
-/**
- * Multi-JVM tests.
- */
-public class GridCachePartitionedNearDisabledAtomicOffHeapTieredMultiJvmFullApiSelfTest
- extends GridCachePartitionedNearDisabledAtomicOffHeapTieredMultiNodeFullApiSelfTest {
- /** {@inheritDoc} */
- protected boolean isMultiJvm() {
- return true;
- }
-
- /** {@inheritDoc} */
- @Override public void testLocalClearKeys() throws Exception {
- fail("https://issues.apache.org/jira/browse/IGNITE-1107");
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCachePartitionedNearDisabledAtomicOnheapMultiJvmFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCachePartitionedNearDisabledAtomicOnheapMultiJvmFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCachePartitionedNearDisabledAtomicOnheapMultiJvmFullApiSelfTest.java
new file mode 100644
index 0000000..0ce6ada
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCachePartitionedNearDisabledAtomicOnheapMultiJvmFullApiSelfTest.java
@@ -0,0 +1,28 @@
+/*
+ * 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.multijvm;
+
+import org.apache.ignite.internal.processors.cache.distributed.dht.GridCachePartitionedNearDisabledAtomicOnheapMultiNodeFullApiSelfTest;
+
+public class GridCachePartitionedNearDisabledAtomicOnheapMultiJvmFullApiSelfTest extends GridCachePartitionedNearDisabledAtomicOnheapMultiNodeFullApiSelfTest {
+ /** {@inheritDoc} */
+ @Override protected boolean isMultiJvm() {
+ return true;
+ }
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCachePartitionedNearDisabledOffHeapMultiJvmFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCachePartitionedNearDisabledOffHeapMultiJvmFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCachePartitionedNearDisabledOffHeapMultiJvmFullApiSelfTest.java
deleted file mode 100644
index 121d453..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCachePartitionedNearDisabledOffHeapMultiJvmFullApiSelfTest.java
+++ /dev/null
@@ -1,31 +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.multijvm;
-
-import org.apache.ignite.internal.processors.cache.distributed.dht.GridCachePartitionedNearDisabledOffHeapMultiNodeFullApiSelfTest;
-
-/**
- * Multi-JVM tests.
- */
-public class GridCachePartitionedNearDisabledOffHeapMultiJvmFullApiSelfTest extends
- GridCachePartitionedNearDisabledOffHeapMultiNodeFullApiSelfTest {
- /** {@inheritDoc} */
- protected boolean isMultiJvm() {
- return true;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCachePartitionedNearDisabledOffHeapTieredMultiJvmFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCachePartitionedNearDisabledOffHeapTieredMultiJvmFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCachePartitionedNearDisabledOffHeapTieredMultiJvmFullApiSelfTest.java
deleted file mode 100644
index fbe6098..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCachePartitionedNearDisabledOffHeapTieredMultiJvmFullApiSelfTest.java
+++ /dev/null
@@ -1,36 +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.multijvm;
-
-import org.apache.ignite.internal.processors.cache.distributed.dht.GridCachePartitionedNearDisabledOffHeapTieredMultiNodeFullApiSelfTest;
-
-/**
- * Multi-JVM tests.
- */
-public class GridCachePartitionedNearDisabledOffHeapTieredMultiJvmFullApiSelfTest
- extends GridCachePartitionedNearDisabledOffHeapTieredMultiNodeFullApiSelfTest {
- /** {@inheritDoc} */
- protected boolean isMultiJvm() {
- return true;
- }
-
- /** {@inheritDoc} */
- @Override public void testLocalClearKeys() throws Exception {
- fail("https://issues.apache.org/jira/browse/IGNITE-1107");
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCachePartitionedNearDisabledOnheapMultiJvmFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCachePartitionedNearDisabledOnheapMultiJvmFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCachePartitionedNearDisabledOnheapMultiJvmFullApiSelfTest.java
new file mode 100644
index 0000000..e2d716f
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCachePartitionedNearDisabledOnheapMultiJvmFullApiSelfTest.java
@@ -0,0 +1,28 @@
+/*
+ * 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.multijvm;
+
+import org.apache.ignite.internal.processors.cache.distributed.dht.GridCachePartitionedNearDisabledOnheapMultiNodeFullApiSelfTest;
+
+public class GridCachePartitionedNearDisabledOnheapMultiJvmFullApiSelfTest extends GridCachePartitionedNearDisabledOnheapMultiNodeFullApiSelfTest {
+ /** {@inheritDoc} */
+ @Override protected boolean isMultiJvm() {
+ return true;
+ }
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCachePartitionedOffHeapMultiJvmFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCachePartitionedOffHeapMultiJvmFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCachePartitionedOffHeapMultiJvmFullApiSelfTest.java
deleted file mode 100644
index 73abe6d..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCachePartitionedOffHeapMultiJvmFullApiSelfTest.java
+++ /dev/null
@@ -1,31 +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.multijvm;
-
-import org.apache.ignite.internal.processors.cache.distributed.near.GridCachePartitionedOffHeapMultiNodeFullApiSelfTest;
-
-/**
- * Multi-JVM tests.
- */
-public class GridCachePartitionedOffHeapMultiJvmFullApiSelfTest extends
- GridCachePartitionedOffHeapMultiNodeFullApiSelfTest {
- /** {@inheritDoc} */
- protected boolean isMultiJvm() {
- return true;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCachePartitionedOffHeapTieredMultiJvmFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCachePartitionedOffHeapTieredMultiJvmFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCachePartitionedOffHeapTieredMultiJvmFullApiSelfTest.java
deleted file mode 100644
index 7b7d64f..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCachePartitionedOffHeapTieredMultiJvmFullApiSelfTest.java
+++ /dev/null
@@ -1,36 +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.multijvm;
-
-import org.apache.ignite.internal.processors.cache.distributed.near.GridCachePartitionedOffHeapTieredMultiNodeFullApiSelfTest;
-
-/**
- * Multi-JVM tests.
- */
-public class GridCachePartitionedOffHeapTieredMultiJvmFullApiSelfTest
- extends GridCachePartitionedOffHeapTieredMultiNodeFullApiSelfTest {
- /** {@inheritDoc} */
- protected boolean isMultiJvm() {
- return true;
- }
-
- /** {@inheritDoc} */
- @Override public void testLocalClearKeys() throws Exception {
- fail("https://issues.apache.org/jira/browse/IGNITE-1107");
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCachePartitionedOnheapMultiJvmFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCachePartitionedOnheapMultiJvmFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCachePartitionedOnheapMultiJvmFullApiSelfTest.java
new file mode 100644
index 0000000..bdde212
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCachePartitionedOnheapMultiJvmFullApiSelfTest.java
@@ -0,0 +1,28 @@
+/*
+ * 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.multijvm;
+
+import org.apache.ignite.internal.processors.cache.distributed.near.GridCachePartitionedOnheapMultiNodeFullApiSelfTest;
+
+public class GridCachePartitionedOnheapMultiJvmFullApiSelfTest extends GridCachePartitionedOnheapMultiNodeFullApiSelfTest {
+ /** {@inheritDoc} */
+ @Override protected boolean isMultiJvm() {
+ return true;
+ }
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheReplicatedOffHeapMultiJvmFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheReplicatedOffHeapMultiJvmFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheReplicatedOffHeapMultiJvmFullApiSelfTest.java
deleted file mode 100644
index 81d7e9b..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheReplicatedOffHeapMultiJvmFullApiSelfTest.java
+++ /dev/null
@@ -1,31 +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.multijvm;
-
-import org.apache.ignite.internal.processors.cache.distributed.replicated.GridCacheReplicatedOffHeapMultiNodeFullApiSelfTest;
-
-/**
- * Multi-JVM tests.
- */
-public class GridCacheReplicatedOffHeapMultiJvmFullApiSelfTest extends
- GridCacheReplicatedOffHeapMultiNodeFullApiSelfTest {
- /** {@inheritDoc} */
- protected boolean isMultiJvm() {
- return true;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheReplicatedOffHeapTieredMultiJvmFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheReplicatedOffHeapTieredMultiJvmFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheReplicatedOffHeapTieredMultiJvmFullApiSelfTest.java
deleted file mode 100644
index 6ecf12b..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheReplicatedOffHeapTieredMultiJvmFullApiSelfTest.java
+++ /dev/null
@@ -1,36 +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.multijvm;
-
-import org.apache.ignite.internal.processors.cache.distributed.replicated.GridCacheReplicatedOffHeapTieredMultiNodeFullApiSelfTest;
-
-/**
- * Multi-JVM tests.
- */
-public class GridCacheReplicatedOffHeapTieredMultiJvmFullApiSelfTest
- extends GridCacheReplicatedOffHeapTieredMultiNodeFullApiSelfTest {
- /** {@inheritDoc} */
- protected boolean isMultiJvm() {
- return true;
- }
-
- /** {@inheritDoc} */
- @Override public void testLocalClearKeys() throws Exception {
- fail("https://issues.apache.org/jira/browse/IGNITE-1107");
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheReplicatedOnheapMultiJvmFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheReplicatedOnheapMultiJvmFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheReplicatedOnheapMultiJvmFullApiSelfTest.java
new file mode 100644
index 0000000..c609ce7
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheReplicatedOnheapMultiJvmFullApiSelfTest.java
@@ -0,0 +1,28 @@
+/*
+ * 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.multijvm;
+
+import org.apache.ignite.internal.processors.cache.distributed.replicated.GridCacheReplicatedOnheapMultiNodeFullApiSelfTest;
+
+public class GridCacheReplicatedOnheapMultiJvmFullApiSelfTest extends GridCacheReplicatedOnheapMultiNodeFullApiSelfTest {
+ /** {@inheritDoc} */
+ @Override protected boolean isMultiJvm() {
+ return true;
+ }
+}
[17/17] ignite git commit: IGNITE-4535 - Add option to store
deserialized values on-heap
Posted by ag...@apache.org.
IGNITE-4535 - Add option to store deserialized values on-heap
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/c56c4b8c
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/c56c4b8c
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/c56c4b8c
Branch: refs/heads/ignite-3477-master
Commit: c56c4b8c6a648c5901515399071bba7844cedb7a
Parents: 7102d53
Author: Ilya Lantukh <il...@gridgain.com>
Authored: Mon Apr 10 14:48:54 2017 +0300
Committer: Alexey Goncharuk <al...@gmail.com>
Committed: Mon Apr 10 17:17:59 2017 +0300
----------------------------------------------------------------------
.../apache/ignite/cache/CacheMemoryMode.java | 63 -
.../org/apache/ignite/cache/CachePeekMode.java | 5 +-
.../configuration/CacheConfiguration.java | 309 +--
.../configuration/CollectionConfiguration.java | 16 -
.../configuration/NearCacheConfiguration.java | 1 -
.../communication/GridIoMessageFactory.java | 12 -
.../processors/cache/CacheEvictionManager.java | 15 -
.../processors/cache/CacheMetricsImpl.java | 11 +-
.../cache/CacheOffheapEvictionManager.java | 15 -
.../processors/cache/GridCacheAdapter.java | 97 +-
.../processors/cache/GridCacheAttributes.java | 14 -
.../cache/GridCacheConcurrentMap.java | 2 +
.../cache/GridCacheConcurrentMapImpl.java | 3 +-
.../cache/GridCacheEvictionManager.java | 1755 +-----------------
.../cache/GridCacheEvictionRequest.java | 248 ---
.../cache/GridCacheEvictionResponse.java | 225 ---
.../processors/cache/GridCacheIoManager.java | 14 -
.../processors/cache/GridCacheProcessor.java | 21 +-
.../processors/cache/GridCacheUtils.java | 8 -
.../processors/cache/GridNoStorageCacheMap.java | 1 +
.../cache/IgniteCacheOffheapManagerImpl.java | 6 +-
.../GridDistributedCacheAdapter.java | 6 +
.../distributed/dht/GridDhtCacheAdapter.java | 29 +-
.../distributed/dht/GridDhtLocalPartition.java | 103 +-
.../dht/GridDhtPartitionTopologyImpl.java | 2 +-
.../distributed/near/GridNearCacheAdapter.java | 18 -
.../datastructures/DataStructuresProcessor.java | 1 -
.../utils/PlatformConfigurationUtils.java | 17 +-
.../visor/cache/VisorCacheConfiguration.java | 1 -
.../cache/VisorCacheEvictionConfiguration.java | 55 -
.../cache/VisorCacheQueryConfiguration.java | 1 -
.../internal/ClusterNodeMetricsSelfTest.java | 46 +-
.../BinaryObjectOffHeapUnswapTemporaryTest.java | 365 ----
.../cache/CacheConfigurationLeakTest.java | 1 +
.../cache/CacheDeferredDeleteQueueTest.java | 2 +-
...cheDhtLocalPartitionAfterRemoveSelfTest.java | 2 +-
.../cache/CacheEnumOperationsAbstractTest.java | 52 +-
.../cache/CacheGetEntryAbstractTest.java | 2 +
...erceptorPartitionCounterLocalSanityTest.java | 25 +-
...torPartitionCounterRandomOperationsTest.java | 111 --
.../cache/CacheNearReaderUpdateTest.java | 12 -
.../cache/CacheOffheapMapEntrySelfTest.java | 42 +-
.../CachePutEventListenerErrorSelfTest.java | 41 +-
.../CacheSerializableTransactionsTest.java | 54 +-
.../cache/CacheSwapUnswapGetTest.java | 310 ----
...idAbstractCacheInterceptorRebalanceTest.java | 6 -
...ridCacheAbstractByteArrayValuesSelfTest.java | 6 -
.../cache/GridCacheAbstractFullApiSelfTest.java | 183 +-
.../GridCacheAbstractLocalStoreSelfTest.java | 13 -
.../GridCacheAbstractRemoveFailureTest.java | 26 +-
.../cache/GridCacheAbstractSelfTest.java | 21 +-
.../cache/GridCacheClearSelfTest.java | 113 +-
.../GridCacheConcurrentTxMultiNodeTest.java | 2 +-
...idCacheConfigurationConsistencySelfTest.java | 41 +-
.../GridCacheDeploymentOffHeapSelfTest.java | 41 -
...ridCacheDeploymentOffHeapValuesSelfTest.java | 41 -
.../GridCacheEvictionEventAbstractTest.java | 5 +-
...heInterceptorAtomicOffheapRebalanceTest.java | 30 -
...GridCacheInterceptorAtomicRebalanceTest.java | 6 -
...ceptorTransactionalOffheapRebalanceTest.java | 35 -
...heInterceptorTransactionalRebalanceTest.java | 6 -
.../cache/GridCacheLifecycleAwareSelfTest.java | 1 +
.../cache/GridCacheMemoryModeSelfTest.java | 285 ---
.../cache/GridCacheObjectToStringSelfTest.java | 1 +
...HeapMultiThreadedUpdateAbstractSelfTest.java | 3 -
.../GridCacheOffHeapTieredAbstractSelfTest.java | 679 -------
.../GridCacheOffHeapTieredAtomicSelfTest.java | 32 -
...heOffHeapTieredEvictionAbstractSelfTest.java | 364 ----
...acheOffHeapTieredEvictionAtomicSelfTest.java | 32 -
.../GridCacheOffHeapTieredEvictionSelfTest.java | 33 -
.../cache/GridCacheOffHeapTieredSelfTest.java | 33 -
.../cache/GridCacheOffheapUpdateSelfTest.java | 3 -
.../cache/GridCachePartitionedGetSelfTest.java | 1 -
...chePartitionedOffHeapLocalStoreSelfTest.java | 44 -
.../GridCachePreloadingEvictionsSelfTest.java | 7 +-
.../cache/GridCachePutAllFailoverSelfTest.java | 58 -
.../cache/GridCacheReloadSelfTest.java | 4 +-
.../cache/GridCacheSwapPreloadSelfTest.java | 1 -
.../GridCacheTtlManagerEvictionSelfTest.java | 26 +-
.../GridCacheValueBytesPreloadingSelfTest.java | 44 -
.../cache/IgniteCacheAbstractTest.java | 6 +-
...IgniteCacheAtomicPutAllFailoverSelfTest.java | 5 -
.../IgniteCacheConfigVariationsFullApiTest.java | 189 +-
.../IgniteCacheEntryListenerAbstractTest.java | 11 -
...cheEntryListenerAtomicOffheapTieredTest.java | 32 -
...cheEntryListenerAtomicOffheapValuesTest.java | 32 -
...niteCacheEntryListenerExpiredEventsTest.java | 26 +-
...teCacheEntryListenerTxOffheapTieredTest.java | 32 -
...teCacheEntryListenerTxOffheapValuesTest.java | 32 -
...niteCacheExpireAndUpdateConsistencyTest.java | 35 +-
.../IgniteCacheInterceptorSelfTestSuite.java | 2 -
...gniteCacheInvokeReadThroughAbstractTest.java | 4 -
...iteCacheInvokeReadThroughSingleNodeTest.java | 32 +-
.../cache/IgniteCacheInvokeReadThroughTest.java | 92 +-
...gniteCacheLoadRebalanceEvictionSelfTest.java | 3 +-
...gniteCacheP2pUnmarshallingNearErrorTest.java | 4 +-
.../cache/IgniteCachePeekModesAbstractTest.java | 117 +-
.../IgniteCacheReadThroughEvictionSelfTest.java | 10 +-
.../IgniteCacheStoreValueAbstractTest.java | 5 -
.../cache/IgniteCacheTxNearPeekModesTest.java | 5 +-
.../cache/IgniteCacheTxPeekModesTest.java | 5 +-
.../cache/OffHeapTieredTransactionSelfTest.java | 134 --
...heapCacheMetricsForClusterGroupSelfTest.java | 3 -
.../GridCacheBinaryObjectsAbstractSelfTest.java | 26 +-
...AtomicNearDisabledOffheapTieredSelfTest.java | 29 -
...ObjectsAtomicNearDisabledOnheapSelfTest.java | 8 +
...inaryObjectsAtomicOffheapTieredSelfTest.java | 29 -
...dCacheBinaryObjectsAtomicOnheapSelfTest.java | 8 +
...tionedNearDisabledOffheapTieredSelfTest.java | 30 -
...tsPartitionedNearDisabledOnheapSelfTest.java | 8 +
...ObjectsPartitionedOffheapTieredSelfTest.java | 30 -
...eBinaryObjectsPartitionedOnheapSelfTest.java | 8 +
.../dht/GridCacheMemoryModeBinarySelfTest.java | 36 -
...dCacheOffHeapTieredAtomicBinarySelfTest.java | 48 -
.../GridCacheOffHeapTieredBinarySelfTest.java | 48 -
...fHeapTieredEvictionAtomicBinarySelfTest.java | 96 -
...acheOffHeapTieredEvictionBinarySelfTest.java | 96 -
...BinaryObjectsLocalOffheapTieredSelfTest.java | 29 -
...idCacheBinaryObjectsLocalOnheapSelfTest.java | 26 +
.../GridCacheQueueCleanupSelfTest.java | 7 -
...dCacheQueueMultiNodeConsistencySelfTest.java | 7 -
.../IgniteCollectionAbstractTest.java | 7 -
.../IgniteDataStructureUniqueNameTest.java | 7 -
.../GridCacheLocalAtomicOffheapSetSelfTest.java | 32 -
.../GridCacheLocalAtomicQueueApiSelfTest.java | 6 -
.../local/GridCacheLocalAtomicSetSelfTest.java | 7 -
.../GridCacheLocalOffheapQueueApiSelfTest.java | 31 -
.../local/GridCacheLocalQueueApiSelfTest.java | 7 -
.../local/GridCacheLocalSetSelfTest.java | 7 -
...artitionedAtomicOffheapQueueApiSelfTest.java | 32 -
...omicOffheapQueueCreateMultiNodeSelfTest.java | 32 -
...onedAtomicOffheapQueueMultiNodeSelfTest.java | 32 -
...dCachePartitionedAtomicQueueApiSelfTest.java | 7 -
...ionedAtomicQueueCreateMultiNodeSelfTest.java | 7 -
...micQueueFailoverDataConsistencySelfTest.java | 7 -
...PartitionedAtomicQueueMultiNodeSelfTest.java | 7 -
...itionedAtomicQueueRotativeMultiNodeTest.java | 7 -
...chePartitionedAtomicSetFailoverSelfTest.java | 7 -
...rtitionedDataStructuresFailoverSelfTest.java | 7 -
...artitionedOffHeapValuesQueueApiSelfTest.java | 35 -
...achePartitionedOffHeapValuesSetSelfTest.java | 32 -
...edOffheapDataStructuresFailoverSelfTest.java | 33 -
...hePartitionedOffheapSetFailoverSelfTest.java | 32 -
.../GridCachePartitionedQueueApiSelfTest.java | 7 -
...PartitionedQueueCreateMultiNodeSelfTest.java | 7 -
...dCachePartitionedQueueEntryMoveSelfTest.java | 7 -
...nedQueueFailoverDataConsistencySelfTest.java | 7 -
...CachePartitionedQueueJoinedNodeSelfTest.java | 7 -
...dCachePartitionedQueueMultiNodeSelfTest.java | 7 -
...hePartitionedQueueRotativeMultiNodeTest.java | 7 -
...GridCachePartitionedSetFailoverSelfTest.java | 7 -
.../GridCachePartitionedSetSelfTest.java | 7 -
.../IgnitePartitionedQueueNoBackupsTest.java | 7 -
...eplicatedDataStructuresFailoverSelfTest.java | 7 -
.../GridCacheReplicatedQueueApiSelfTest.java | 7 -
...idCacheReplicatedQueueMultiNodeSelfTest.java | 7 -
...cheReplicatedQueueRotativeMultiNodeTest.java | 7 -
.../GridCacheReplicatedSetSelfTest.java | 7 -
...tractDistributedByteArrayValuesSelfTest.java | 120 +-
.../GridCacheAbstractNodeRestartSelfTest.java | 116 +-
...tractPartitionedByteArrayValuesSelfTest.java | 33 -
.../IgniteCacheAtomicNodeRestartTest.java | 5 -
.../IgniteCacheNearOffheapGetSelfTest.java | 136 --
.../IgniteCacheTxIteratorSelfTest.java | 34 +-
...tPartitionedOnlyByteArrayValuesSelfTest.java | 55 +-
...eColocatedOptimisticTransactionSelfTest.java | 1 -
...GridCacheDhtEvictionNearReadersSelfTest.java | 6 +-
.../dht/GridCacheDhtEvictionSelfTest.java | 356 ----
.../dht/GridCacheDhtPreloadOffHeapSelfTest.java | 38 -
.../dht/GridCacheDhtPreloadOnheapSelfTest.java | 26 +
.../dht/GridCacheDhtPreloadSelfTest.java | 38 +-
...icOffHeapTieredMultiNodeFullApiSelfTest.java | 43 -
...NearDisabledAtomicOnheapFullApiSelfTest.java | 38 +
...ledAtomicOnheapMultiNodeFullApiSelfTest.java | 28 +
...ionedNearDisabledOffHeapFullApiSelfTest.java | 33 -
...DisabledOffHeapMultiNodeFullApiSelfTest.java | 33 -
...abledOffHeapTieredAtomicFullApiSelfTest.java | 57 -
...earDisabledOffHeapTieredFullApiSelfTest.java | 33 -
...edOffHeapTieredMultiNodeFullApiSelfTest.java | 33 -
...tionedNearDisabledOnheapFullApiSelfTest.java | 27 +
...rDisabledOnheapMultiNodeFullApiSelfTest.java | 27 +
.../dht/IgniteCacheConcurrentPutGetRemove.java | 27 +-
.../IgniteCacheCrossCacheTxFailoverTest.java | 46 +-
.../dht/IgniteCacheMultiTxLockSelfTest.java | 1 +
.../IgniteCachePutRetryAbstractSelfTest.java | 53 +-
.../dht/IgniteCachePutRetryAtomicSelfTest.java | 2 +-
...gniteCachePutRetryTransactionalSelfTest.java | 28 +-
...eAtomicInvalidPartitionHandlingSelfTest.java | 65 +-
...tomicClientOnlyMultiNodeFullApiSelfTest.java | 113 +-
...eAtomicNearOnlyMultiNodeFullApiSelfTest.java | 52 -
.../GridCacheAtomicOffHeapFullApiSelfTest.java | 67 -
...heAtomicOffHeapMultiNodeFullApiSelfTest.java | 68 -
...CacheAtomicOffHeapTieredFullApiSelfTest.java | 32 -
...icOffHeapTieredMultiNodeFullApiSelfTest.java | 33 -
.../GridCacheAtomicOnheapFullApiSelfTest.java | 28 +
...cheAtomicOnheapMultiNodeFullApiSelfTest.java | 26 +
...PrimaryWriteOrderOffHeapFullApiSelfTest.java | 32 -
...yWriteOrderOffHeapTieredFullApiSelfTest.java | 33 -
...cPrimaryWriteOrderOnheapFullApiSelfTest.java | 28 +
...riteOrderOnheapMultiNodeFullApiSelfTest.java | 29 +
...ityOrderOffHeapMultiNodeFullApiSelfTest.java | 33 -
...erOffHeapTieredMultiNodeFullApiSelfTest.java | 33 -
.../near/GridCacheNearReadersSelfTest.java | 1 -
...ePartitionedAtomicOnheapFullApiSelfTest.java | 38 +
...nedAtomicOnheapMultiNodeFullApiSelfTest.java | 28 +
.../GridCachePartitionedEvictionSelfTest.java | 1 +
.../GridCachePartitionedFullApiSelfTest.java | 2 -
...achePartitionedMultiNodeFullApiSelfTest.java | 43 -
...ePartitionedMultiThreadedPutGetSelfTest.java | 2 +-
...dCachePartitionedOffHeapFullApiSelfTest.java | 32 -
...titionedOffHeapMultiNodeFullApiSelfTest.java | 32 -
...PartitionedOffHeapTieredFullApiSelfTest.java | 32 -
...edOffHeapTieredMultiNodeFullApiSelfTest.java | 74 -
...idCachePartitionedOnheapFullApiSelfTest.java | 26 +
...rtitionedOnheapMultiNodeFullApiSelfTest.java | 26 +
.../GridNearOffheapCacheStoreUpdateTest.java | 35 -
...stractReplicatedByteArrayValuesSelfTest.java | 29 -
.../GridCacheReplicatedEvictionSelfTest.java | 135 --
...idCacheReplicatedOffHeapFullApiSelfTest.java | 32 -
...plicatedOffHeapMultiNodeFullApiSelfTest.java | 32 -
...eReplicatedOffHeapTieredFullApiSelfTest.java | 33 -
...edOffHeapTieredMultiNodeFullApiSelfTest.java | 33 -
...ridCacheReplicatedOnheapFullApiSelfTest.java | 26 +
...eplicatedOnheapMultiNodeFullApiSelfTest.java | 26 +
...idCacheReplicatedPreloadOffHeapSelfTest.java | 37 -
.../cache/eviction/EvictionAbstractTest.java | 37 +-
.../GridCacheBatchEvictUnswapSelfTest.java | 199 --
...heConcurrentEvictionConsistencySelfTest.java | 6 +-
.../GridCacheConcurrentEvictionsSelfTest.java | 1 +
.../GridCacheDistributedEvictionsSelfTest.java | 235 ---
.../GridCacheEmptyEntriesAbstractSelfTest.java | 4 +-
.../GridCacheEvictableEntryEqualsSelfTest.java | 1 +
.../GridCacheEvictionFilterSelfTest.java | 2 +-
.../GridCacheEvictionLockUnlockSelfTest.java | 1 +
.../GridCacheEvictionTouchSelfTest.java | 12 +-
...cheSynchronousEvictionsFailoverSelfTest.java | 166 --
.../lru/LruNearEvictionPolicySelfTest.java | 28 -
.../LruNearOnlyNearEvictionPolicySelfTest.java | 55 -
.../SortedEvictionPolicyPerformanceTest.java | 2 +-
...CacheAtomicLocalOffheapExpiryPolicyTest.java | 30 -
...eCacheAtomicLocalOnheapExpiryPolicyTest.java | 26 +
...gniteCacheAtomicOffheapExpiryPolicyTest.java | 30 -
...IgniteCacheAtomicOnheapExpiryPolicyTest.java | 26 +
...rimaryWriteOrderOffheapExpiryPolicyTest.java | 31 -
...teOrderWithStoreOffheapExpiryPolicyTest.java | 31 -
...AtomicReplicatedOffheapExpiryPolicyTest.java | 30 -
...eAtomicWithStoreOffheapExpiryPolicyTest.java | 30 -
.../IgniteCacheExpiryPolicyAbstractTest.java | 13 -
.../IgniteCacheExpiryPolicyTestSuite.java | 13 -
...niteCacheTxLocalOffheapExpiryPolicyTest.java | 30 -
.../IgniteCacheTxOffheapExpiryPolicyTest.java | 30 -
...acheTxReplicatedOffheapExpiryPolicyTest.java | 30 -
...CacheTxWithStoreOffheapExpiryPolicyTest.java | 30 -
...dCacheLocalAtomicOffHeapFullApiSelfTest.java | 42 -
...LocalAtomicOffHeapTieredFullApiSelfTest.java | 32 -
.../GridCacheLocalByteArrayValuesSelfTest.java | 64 +-
.../GridCacheLocalOffHeapFullApiSelfTest.java | 30 -
...dCacheLocalOffHeapTieredFullApiSelfTest.java | 32 -
...LocalCacheOffHeapAndSwapMetricsSelfTest.java | 463 -----
...cheAtomicOffHeapMultiJvmFullApiSelfTest.java | 31 -
...micOffHeapTieredMultiJvmFullApiSelfTest.java | 36 -
...acheAtomicOnheapMultiJvmFullApiSelfTest.java | 28 +
...WriteOrderOnheapMultiJvmFullApiSelfTest.java | 29 +
...rityOrderOffHeapMultiJvmFullApiSelfTest.java | 31 -
...derOffHeapTieredMultiJvmFullApiSelfTest.java | 36 -
...micOffHeapTieredMultiJvmFullApiSelfTest.java | 36 -
...bledAtomicOnheapMultiJvmFullApiSelfTest.java | 28 +
...rDisabledOffHeapMultiJvmFullApiSelfTest.java | 31 -
...ledOffHeapTieredMultiJvmFullApiSelfTest.java | 36 -
...arDisabledOnheapMultiJvmFullApiSelfTest.java | 28 +
...rtitionedOffHeapMultiJvmFullApiSelfTest.java | 31 -
...nedOffHeapTieredMultiJvmFullApiSelfTest.java | 36 -
...artitionedOnheapMultiJvmFullApiSelfTest.java | 28 +
...eplicatedOffHeapMultiJvmFullApiSelfTest.java | 31 -
...tedOffHeapTieredMultiJvmFullApiSelfTest.java | 36 -
...ReplicatedOnheapMultiJvmFullApiSelfTest.java | 28 +
.../GridCacheSwapScanQueryAbstractSelfTest.java | 450 -----
.../query/GridCacheSwapScanQuerySelfTest.java | 25 -
.../IgniteCacheQueryCacheDestroySelfTest.java | 2 -
.../continuous/CacheContinuousBatchAckTest.java | 73 +-
...eContinuousQueryAsyncFilterListenerTest.java | 170 +-
...acheContinuousQueryExecuteInPrimaryTest.java | 2 -
...usQueryFactoryFilterRandomOperationTest.java | 2 -
...ContinuousQueryFailoverAbstractSelfTest.java | 10 -
...tomicPrimaryWriteOrderOffheapTieredTest.java | 33 -
...tinuousQueryFailoverTxOffheapTieredTest.java | 32 -
.../CacheContinuousQueryOperationP2PTest.java | 31 +-
.../CacheContinuousQueryOrderingEventTest.java | 127 +-
...acheContinuousQueryRandomOperationsTest.java | 246 ---
...CacheKeepBinaryIterationNearEnabledTest.java | 6 +-
...acheKeepBinaryIterationStoreEnabledTest.java | 6 +-
.../CacheKeepBinaryIterationTest.java | 105 +-
...ridCacheContinuousQueryAbstractSelfTest.java | 10 -
...eContinuousQueryAtomicOffheapTieredTest.java | 32 -
...eContinuousQueryAtomicOffheapValuesTest.java | 32 -
...CacheContinuousQueryTxOffheapTieredTest.java | 32 -
...CacheContinuousQueryTxOffheapValuesTest.java | 32 -
...edEntryPartitionedAtomicOffHeapSelfTest.java | 35 -
...PartitionedTransactionalOffHeapSelfTest.java | 36 -
...nedEntryReplicatedAtomicOffHeapSelfTest.java | 35 -
...yReplicatedTransactionalOffHeapSelfTest.java | 36 -
.../DataStreamProcessorSelfTest.java | 2 -
.../igfs/IgfsAbstractBaseSelfTest.java | 18 -
.../processors/igfs/IgfsAbstractSelfTest.java | 11 -
.../IgfsAtomicPrimaryOffheapTieredSelfTest.java | 39 -
.../IgfsAtomicPrimaryOffheapValuesSelfTest.java | 39 -
...sCachePerBlockLruEvictionPolicySelfTest.java | 1 +
.../processors/igfs/IgfsMaxSizeSelfTest.java | 1 -
.../igfs/IgfsPrimaryOffheapTieredSelfTest.java | 33 -
.../igfs/IgfsPrimaryOffheapValuesSelfTest.java | 33 -
.../loadtests/GridCacheMultiNodeLoadTest.java | 1 +
.../GridCachePartitionedAtomicLongLoadTest.java | 2 +-
...gniteClientReconnectMassiveShutdownTest.java | 3 -
.../ignite/testframework/GridTestUtils.java | 113 --
.../configvariations/ConfigVariations.java | 26 +-
...IgniteCacheConfigVariationsAbstractTest.java | 38 +-
.../junits/common/GridCommonAbstractTest.java | 10 +-
.../ConfigVariationsTestSuiteBuilderTest.java | 4 +-
.../ignite/testsuites/IgniteBasicTestSuite.java | 2 -
.../testsuites/IgniteBinaryCacheTestSuite.java | 19 -
.../IgniteBinaryObjectsTestSuite.java | 13 -
.../IgniteCacheDataStructuresSelfTestSuite.java | 18 -
.../IgniteCacheEvictionSelfTestSuite.java | 8 -
...IgniteCacheFullApiMultiJvmSelfTestSuite.java | 37 +-
.../IgniteCacheFullApiSelfTestSuite.java | 84 +-
.../IgniteCacheMetricsSelfTestSuite.java | 2 -
.../ignite/testsuites/IgniteCacheTestSuite.java | 27 +-
.../testsuites/IgniteCacheTestSuite2.java | 24 +-
.../testsuites/IgniteCacheTestSuite3.java | 14 +-
.../testsuites/IgniteCacheTestSuite4.java | 9 -
.../ignite/testsuites/IgniteIgfsTestSuite.java | 9 -
.../impl/HadoopAbstractMapReduceTest.java | 1 -
.../igfs/HadoopFIleSystemFactorySelfTest.java | 1 -
.../igfs/HadoopIgfsDualAbstractSelfTest.java | 1 -
.../cache/CacheIndexStreamerTest.java | 3 -
.../cache/CacheIndexingOffheapCleanupTest.java | 157 --
.../CacheOffheapBatchIndexingBaseTest.java | 6 +-
.../CacheOffheapBatchIndexingMultiTypeTest.java | 17 +-
...CacheOffheapBatchIndexingSingleTypeTest.java | 20 +-
.../CacheOperationsWithExpirationTest.java | 68 +-
.../cache/CacheQueryEvictDataLostTest.java | 120 ++
.../CacheQueryOffheapEvictDataLostTest.java | 136 --
.../CacheRandomOperationsMultithreadedTest.java | 64 +-
.../ClientReconnectAfterClusterRestartTest.java | 16 +-
.../cache/GridCacheOffHeapSelfTest.java | 1 -
.../GridCacheOffheapIndexEntryEvictTest.java | 4 -
.../cache/GridCacheOffheapIndexGetSelfTest.java | 8 -
.../cache/GridCacheQuerySimpleBenchmark.java | 3 -
.../cache/GridIndexingWithNoopSwapSelfTest.java | 3 +-
...aryObjectQueryArgumentsOffheapLocalTest.java | 28 -
...teBinaryObjectQueryArgumentsOffheapTest.java | 30 -
.../IgniteBinaryObjectQueryArgumentsTest.java | 11 -
...CacheDistributedJoinQueryConditionsTest.java | 16 -
.../cache/IgniteCacheOffheapEvictQueryTest.java | 6 -
.../cache/IgniteCacheOffheapIndexScanTest.java | 3 -
...CacheOffheapTieredMultithreadedSelfTest.java | 301 ---
.../cache/IgniteCacheQueriesLoadTest1.java | 2 -
...QueryMultiThreadedOffHeapTieredSelfTest.java | 38 -
.../IgniteCacheQueryMultiThreadedSelfTest.java | 24 +-
...QueryOffheapEvictsMultiThreadedSelfTest.java | 28 -
...eCacheQueryOffheapMultiThreadedSelfTest.java | 28 -
.../cache/IgniteCrossCachesJoinsQueryTest.java | 16 -
...QueryNodeRestartDistributedJoinSelfTest.java | 50 +-
.../cache/ttl/CacheTtlAbstractSelfTest.java | 9 +-
.../ttl/CacheTtlAtomicAbstractSelfTest.java | 29 +
.../cache/ttl/CacheTtlAtomicLocalSelfTest.java | 34 +
.../ttl/CacheTtlAtomicPartitionedSelfTest.java | 34 +
.../ttl/CacheTtlOffheapAbstractSelfTest.java | 29 -
.../CacheTtlOffheapAtomicAbstractSelfTest.java | 29 -
.../ttl/CacheTtlOffheapAtomicLocalSelfTest.java | 34 -
...acheTtlOffheapAtomicPartitionedSelfTest.java | 34 -
...TtlOffheapTransactionalAbstractSelfTest.java | 29 -
...cheTtlOffheapTransactionalLocalSelfTest.java | 34 -
...OffheapTransactionalPartitionedSelfTest.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 +
.../query/IgniteSqlSegmentedIndexSelfTest.java | 3 +-
.../IgniteCacheQuerySelfTestSuite.java | 11 +-
.../IgniteCacheQuerySelfTestSuite2.java | 13 +-
.../IgniteCacheQuerySelfTestSuite3.java | 8 -
.../IgniteCacheQuerySelfTestSuite4.java | 4 -
.../IgniteCacheWithIndexingTestSuite.java | 26 +-
.../Cache/CacheConfigurationTest.cs | 9 -
.../IgniteConfigurationSerializerTest.cs | 2 -
.../Cache/Configuration/CacheConfiguration.cs | 23 -
.../commands/cache/VisorCacheCommand.scala | 5 -
modules/yardstick/README.txt | 2 -
.../config/benchmark-atomic-win.properties | 8 +-
.../config/benchmark-atomic.properties | 6 -
.../config/benchmark-client-mode.properties | 9 -
.../config/benchmark-multicast.properties | 9 -
.../config/benchmark-query-win.properties | 5 +-
.../yardstick/config/benchmark-query.properties | 3 -
.../config/benchmark-tx-win.properties | 6 +-
.../yardstick/config/benchmark-tx.properties | 4 -
modules/yardstick/config/benchmark.properties | 11 +-
modules/yardstick/config/ignite-base-config.xml | 63 -
.../config/ignite-base-load-config.xml | 63 -
.../config/ignite-cache-load-config.xml | 5 -
.../config/ignite-failover-base-config.xml | 37 -
.../ignite-int-max-values-offheap-config.xml | 88 -
.../ignite-int-max-values-swap-config.xml | 93 -
.../test-max-int-values-offheap.properties | 65 -
.../config/test-max-int-values-swap.properties | 64 -
.../yardstick/IgniteBenchmarkArguments.java | 29 -
.../org/apache/ignite/yardstick/IgniteNode.java | 10 -
.../cache/IgniteGetOffHeapBenchmark.java | 32 -
.../cache/IgniteGetOffHeapValuesBenchmark.java | 32 -
.../cache/IgnitePutGetOffHeapBenchmark.java | 32 -
.../IgnitePutGetOffHeapValuesBenchmark.java | 32 -
.../cache/IgnitePutGetTxOffHeapBenchmark.java | 32 -
.../IgnitePutGetTxOffHeapValuesBenchmark.java | 32 -
.../cache/IgnitePutOffHeapBenchmark.java | 32 -
.../cache/IgnitePutOffHeapValuesBenchmark.java | 32 -
.../IgnitePutRandomValueSizeBenchmark.java | 2 +-
.../cache/IgnitePutTxOffHeapBenchmark.java | 32 -
.../IgnitePutTxOffHeapValuesBenchmark.java | 32 -
.../IgniteSqlQueryJoinOffHeapBenchmark.java | 32 -
.../cache/IgniteSqlQueryOffHeapBenchmark.java | 32 -
.../IgniteSqlQueryPutOffHeapBenchmark.java | 32 -
...IgniteAtomicOffHeapInvokeRetryBenchmark.java | 31 -
.../IgniteAtomicOffHeapRetriesBenchmark.java | 31 -
...ransactionalOffHeapInvokeRetryBenchmark.java | 33 -
...ransactionalOffHeapWriteInvokeBenchmark.java | 37 -
...eTransactionalOffHeapWriteReadBenchmark.java | 32 -
.../IgniteCacheRandomOperationBenchmark.java | 7 -
434 files changed, 1764 insertions(+), 17076 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/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
deleted file mode 100644
index 0133327..0000000
--- a/modules/core/src/main/java/org/apache/ignite/cache/CacheMemoryMode.java
+++ /dev/null
@@ -1,63 +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.cache;
-
-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 {
- /**
- * Entries will be stored on-heap first. The onheap tiered storage works as follows:
- * <nl>
- * <li>Entries are cached on heap memory first.</li>
- * <li>
- * If offheap memory is enabled and eviction policy evicts an entry from heap memory, entry will
- * be moved to offheap memory. If offheap memory is disabled, then entry is simply discarded.
- * </li>
- * <li>
- * If swap space is enabled and offheap memory fills up, then entry will be evicted into swap space.
- * If swap space is disabled, then entry will be discarded. If swap is enabled and offheap memory
- * is disabled, then entry will be evicted directly from heap memory into swap.
- * </li>
- * </nl>
- * <p>
- * <b>Note</b> that heap memory evictions are handled by configured {@link EvictionPolicy}
- * implementation. By default, no eviction policy is enabled, so entries never leave heap
- * memory space unless explicitly removed.
- */
- ONHEAP_TIERED,
-
- /**
- * Works the same as {@link #ONHEAP_TIERED}, except that entries never end up in heap memory and get
- * stored in offheap memory right away. Entries get cached in offheap memory first and then
- * get evicted to swap, if one is configured.
- */
- OFFHEAP_TIERED,
-
- /**
- * Entry keys will be stored on heap memory, and values will be stored in offheap memory. Note
- * that in this mode entries can be evicted only to swap. The evictions will happen according
- * to configured {@link EvictionPolicy}.
- * <p/>
- * Size returned by {@link CachePeekMode#OFFHEAP} is always zero, for this mode.
- */
- OFFHEAP_VALUES,
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/main/java/org/apache/ignite/cache/CachePeekMode.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/CachePeekMode.java b/modules/core/src/main/java/org/apache/ignite/cache/CachePeekMode.java
index 2bfee84..19928e8 100644
--- a/modules/core/src/main/java/org/apache/ignite/cache/CachePeekMode.java
+++ b/modules/core/src/main/java/org/apache/ignite/cache/CachePeekMode.java
@@ -63,10 +63,7 @@ public enum CachePeekMode {
ONHEAP,
/** Peeks value from the off-heap storage only, without loading off-heap value into cache. */
- OFFHEAP,
-
- /** Peeks value from the swap storage only, without loading swapped value into cache. */
- SWAP;
+ OFFHEAP;
/** Enumerated values. */
private static final CachePeekMode[] VALS = values();
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/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 a9cb38e..cfdfed8 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
@@ -48,7 +48,6 @@ import org.apache.ignite.cache.CacheAtomicWriteOrderMode;
import org.apache.ignite.cache.CacheAtomicityMode;
import org.apache.ignite.cache.CacheEntryProcessor;
import org.apache.ignite.cache.CacheInterceptor;
-import org.apache.ignite.cache.CacheMemoryMode;
import org.apache.ignite.cache.CacheMode;
import org.apache.ignite.cache.CacheRebalanceMode;
import org.apache.ignite.cache.CacheWriteSynchronizationMode;
@@ -148,12 +147,6 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
/** Default maximum eviction queue ratio. */
public static final float DFLT_MAX_EVICTION_OVERFLOW_RATIO = 10;
- /** Default eviction synchronized flag. */
- public static final boolean DFLT_EVICT_SYNCHRONIZED = false;
-
- /** Default eviction key buffer size for batching synchronized evicts. */
- public static final int DFLT_EVICT_KEY_BUFFER_SIZE = 1024;
-
/** Default synchronous eviction timeout in milliseconds. */
public static final long DFLT_EVICT_SYNCHRONIZED_TIMEOUT = 10000;
@@ -163,9 +156,6 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
/** Default value for eager ttl flag. */
public static final boolean DFLT_EAGER_TTL = true;
- /** Default off-heap storage size is {@code -1} which means that off-heap storage is disabled. */
- public static final long DFLT_OFFHEAP_MEMORY = -1;
-
/** Default value for 'maxConcurrentAsyncOps'. */
public static final int DFLT_MAX_CONCURRENT_ASYNC_OPS = 500;
@@ -205,9 +195,6 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
/** Default number of queries detail metrics to collect. */
public static final int DFLT_QRY_DETAIL_METRICS_SIZE = 0;
- /** Default size for onheap SQL row cache size. */
- public static final int DFLT_SQL_ONHEAP_ROW_CACHE_SIZE = 10 * 1024;
-
/** Default value for keep binary in store behavior . */
@SuppressWarnings({"UnnecessaryBoxing", "BooleanConstructorCall"})
public static final Boolean DFLT_STORE_KEEP_BINARY = new Boolean(false);
@@ -240,24 +227,12 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
/** Cache expiration policy. */
private EvictionPolicy evictPlc;
- /** Flag indicating whether eviction is synchronized. */
- private boolean evictSync = DFLT_EVICT_SYNCHRONIZED;
-
- /** Eviction key buffer size. */
- private int evictKeyBufSize = DFLT_EVICT_KEY_BUFFER_SIZE;
-
- /** Synchronous eviction concurrency level. */
- private int evictSyncConcurrencyLvl = DFLT_EVICT_SYNCHRONIZED_CONCURRENCY_LEVEL;
-
- /** Synchronous eviction timeout. */
- private long evictSyncTimeout = DFLT_EVICT_SYNCHRONIZED_TIMEOUT;
+ /** */
+ private boolean onheapCache;
/** Eviction filter. */
private EvictionFilter<?, ?> evictFilter;
- /** Maximum eviction overflow ratio. */
- private float evictMaxOverflowRatio = DFLT_MAX_EVICTION_OVERFLOW_RATIO;
-
/** Eager ttl flag. */
private boolean eagerTtl = DFLT_EAGER_TTL;
@@ -318,9 +293,6 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
/** Rebalance batches prefetch count. */
private long rebalanceBatchesPrefetchCount = DFLT_REBALANCE_BATCHES_PREFETCH_COUNT;
- /** Off-heap memory size. */
- private long offHeapMaxMem = DFLT_OFFHEAP_MEMORY;
-
/** Maximum number of concurrent asynchronous operations. */
private int maxConcurrentAsyncOps = DFLT_MAX_CONCURRENT_ASYNC_OPS;
@@ -382,9 +354,6 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
private boolean sqlEscapeAll;
/** */
- private int sqlOnheapRowCacheSize = DFLT_SQL_ONHEAP_ROW_CACHE_SIZE;
-
- /** */
private transient Class<?>[] indexedTypes;
/** Copy on read flag. */
@@ -449,12 +418,7 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
dfltLockTimeout = cc.getDefaultLockTimeout();
eagerTtl = cc.isEagerTtl();
evictFilter = cc.getEvictionFilter();
- evictKeyBufSize = cc.getEvictSynchronizedKeyBufferSize();
- evictMaxOverflowRatio = cc.getEvictMaxOverflowRatio();
evictPlc = cc.getEvictionPolicy();
- evictSync = cc.isEvictSynchronized();
- evictSyncConcurrencyLvl = cc.getEvictSynchronizedConcurrencyLevel();
- evictSyncTimeout = cc.getEvictSynchronizedTimeout();
expiryPolicyFactory = cc.getExpiryPolicyFactory();
indexedTypes = cc.getIndexedTypes();
interceptor = cc.getInterceptor();
@@ -466,13 +430,13 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
listenerConfigurations = cc.listenerConfigurations;
loadPrevVal = cc.isLoadPreviousValue();
longQryWarnTimeout = cc.getLongQueryWarningTimeout();
- offHeapMaxMem = cc.getOffHeapMaxMemory();
maxConcurrentAsyncOps = cc.getMaxConcurrentAsyncOperations();
memPlcName = cc.getMemoryPolicyName();
sqlIndexMaxInlineSize = cc.getSqlIndexMaxInlineSize();
name = cc.getName();
nearCfg = cc.getNearConfiguration();
nodeFilter = cc.getNodeFilter();
+ onheapCache = cc.isOnheapCacheEnabled();
partitionLossPolicy = cc.getPartitionLossPolicy();
pluginCfgs = cc.getPluginConfigurations();
qryEntities = cc.getQueryEntities() == Collections.<QueryEntity>emptyList() ? null : cc.getQueryEntities();
@@ -489,7 +453,6 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
sqlSchema = cc.getSqlSchema();
sqlEscapeAll = cc.isSqlEscapeAll();
sqlFuncCls = cc.getSqlFunctionClasses();
- sqlOnheapRowCacheSize = cc.getSqlOnheapRowCacheSize();
startSize = cc.getStartSize();
storeFactory = cc.getCacheStoreFactory();
storeSesLsnrs = cc.getCacheStoreSessionListenerFactories();
@@ -573,6 +536,25 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
}
/**
+ * @return On-heap cache enabled flag.
+ */
+ public boolean isOnheapCacheEnabled() {
+ return onheapCache;
+ }
+
+ /**
+ * Configures on-heap cache.
+ *
+ * @param onheapCache {@code True} if on-heap cache should be enabled.
+ * @return {@code this} for chaining.
+ */
+ public CacheConfiguration<K, V> setOnheapCacheEnabled(boolean onheapCache) {
+ this.onheapCache = onheapCache;
+
+ return this;
+ }
+
+ /**
* @return Near enabled flag.
*/
public NearCacheConfiguration<K, V> getNearConfiguration() {
@@ -637,153 +619,6 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
}
/**
- * Gets flag indicating whether eviction is synchronized between primary, backup and near nodes.
- * If this parameter is {@code true} and swap is disabled then {@link IgniteCache#localEvict(Collection)}
- * will involve all nodes where an entry is kept. If this property is set to {@code false} then
- * eviction is done independently on different cache nodes.
- * <p>
- * Default value is defined by {@link #DFLT_EVICT_SYNCHRONIZED}.
- * <p>
- * Note that it's not recommended to set this value to {@code true} if cache
- * store is configured since it will allow to significantly improve cache
- * performance.
- *
- * @return {@code true} If eviction is synchronized with backup nodes (or the
- * rest of the nodes in case of replicated cache), {@code false} if not.
- */
- public boolean isEvictSynchronized() {
- return evictSync;
- }
-
- /**
- * Sets flag indicating whether eviction is synchronized with backup nodes or near caches
- * (or the rest of the nodes for replicated cache).
- *
- * @param evictSync {@code true} if synchronized, {@code false} if not.
- * @return {@code this} for chaining.
- */
- public CacheConfiguration<K, V> setEvictSynchronized(boolean evictSync) {
- this.evictSync = evictSync;
-
- return this;
- }
-
- /**
- * Gets size of the key buffer for synchronized evictions.
- * <p>
- * Default value is defined by {@link #DFLT_EVICT_KEY_BUFFER_SIZE}.
- *
- * @return Eviction key buffer size.
- */
- public int getEvictSynchronizedKeyBufferSize() {
- return evictKeyBufSize;
- }
-
- /**
- * Sets eviction key buffer size.
- *
- * @param evictKeyBufSize Eviction key buffer size.
- * @return {@code this} for chaining.
- */
- public CacheConfiguration<K, V> setEvictSynchronizedKeyBufferSize(int evictKeyBufSize) {
- this.evictKeyBufSize = evictKeyBufSize;
-
- return this;
- }
-
- /**
- * Gets concurrency level for synchronized evictions. This flag only makes sense
- * with {@link #isEvictSynchronized()} set
- * to {@code true}. When synchronized evictions are enabled, it is possible that
- * local eviction policy will try to evict entries faster than evictions can be
- * synchronized with backup or near nodes. This value specifies how many concurrent
- * synchronous eviction sessions should be allowed before the system is forced to
- * wait and let synchronous evictions catch up with the eviction policy.
- * <p>
- * Note that if synchronous evictions start lagging, it is possible that you have either
- * too big or too small eviction key buffer size or small eviction timeout. In that case
- * you will need to adjust {@link #getEvictSynchronizedKeyBufferSize} or
- * {@link #getEvictSynchronizedTimeout()} values as well.
- * <p>
- * Default value is defined by {@link #DFLT_EVICT_SYNCHRONIZED_CONCURRENCY_LEVEL}.
- *
- * @return Synchronous eviction concurrency level.
- */
- public int getEvictSynchronizedConcurrencyLevel() {
- return evictSyncConcurrencyLvl;
- }
-
- /**
- * Sets concurrency level for synchronized evictions.
- *
- * @param evictSyncConcurrencyLvl Concurrency level for synchronized evictions.
- * @return {@code this} for chaining.
- */
- public CacheConfiguration<K, V> setEvictSynchronizedConcurrencyLevel(int evictSyncConcurrencyLvl) {
- this.evictSyncConcurrencyLvl = evictSyncConcurrencyLvl;
-
- return this;
- }
-
- /**
- * Gets timeout for synchronized evictions.
- * <p>
- * Node that initiates eviction waits for responses
- * from remote nodes within this timeout.
- * <p>
- * Default value is defined by {@link #DFLT_EVICT_SYNCHRONIZED_TIMEOUT}.
- *
- * @return Synchronous eviction timeout.
- */
- public long getEvictSynchronizedTimeout() {
- return evictSyncTimeout;
- }
-
- /**
- * Sets timeout for synchronized evictions.
- *
- * @param evictSyncTimeout Timeout for synchronized evictions.
- * @return {@code this} for chaining.
- */
- public CacheConfiguration<K, V> setEvictSynchronizedTimeout(long evictSyncTimeout) {
- this.evictSyncTimeout = evictSyncTimeout;
-
- return this;
- }
-
- /**
- * This value denotes the maximum size of eviction queue in percents of cache
- * size in case of distributed cache (replicated and partitioned) and using
- * synchronized eviction (that is if {@link #isEvictSynchronized()} returns
- * {@code true}).
- * <p>
- * That queue is used internally as a buffer to decrease network costs for
- * synchronized eviction. Once queue size reaches specified value all required
- * requests for all entries in the queue are sent to remote nodes and the queue
- * is cleared.
- * <p>
- * Default value is defined by {@link #DFLT_MAX_EVICTION_OVERFLOW_RATIO} and
- * equals to {@code 10%}.
- *
- * @return Maximum size of eviction queue in percents of cache size.
- */
- public float getEvictMaxOverflowRatio() {
- return evictMaxOverflowRatio;
- }
-
- /**
- * Sets maximum eviction overflow ratio.
- *
- * @param evictMaxOverflowRatio Maximum eviction overflow ratio.
- * @return {@code this} for chaining.
- */
- public CacheConfiguration<K, V> setEvictMaxOverflowRatio(float evictMaxOverflowRatio) {
- this.evictMaxOverflowRatio = evictMaxOverflowRatio;
-
- return this;
- }
-
- /**
* Gets eviction filter to specify which entries should not be evicted
* (except explicit evict by calling {@link IgniteCache#localEvict(Collection)}).
* If {@link EvictionFilter#evictAllowed(Cache.Entry)} method
@@ -1624,53 +1459,6 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
}
/**
- * Gets maximum amount of memory available to off-heap storage. Possible values are
- * <ul>
- * <li>{@code -1} - Means that off-heap storage is disabled.</li>
- * <li>
- * {@code 0} - Ignite will not limit off-heap storage (it's up to user to properly
- * add and remove entries from cache to ensure that off-heap storage does not grow
- * indefinitely.
- * </li>
- * <li>Any positive value specifies the limit of off-heap storage in bytes.</li>
- * </ul>
- * Default value is {@code -1}, specified by {@link #DFLT_OFFHEAP_MEMORY} constant
- * which means that off-heap storage is disabled by default.
- * <p>
- * Use off-heap storage to load gigabytes of data in memory without slowing down
- * Garbage Collection. Essentially in this case you should allocate very small amount
- * of memory to JVM and Ignite will cache most of the data in off-heap space
- * without affecting JVM performance at all.
- * <p>
- * Note that Ignite will throw an exception if max memory is set to {@code -1} and
- * {@code offHeapValuesOnly} flag is set to {@code true}.
- *
- * @return Maximum memory in bytes available to off-heap memory space.
- */
- public long getOffHeapMaxMemory() {
- return offHeapMaxMem;
- }
-
- /**
- * Sets maximum amount of memory available to off-heap storage. Possible values are <ul> <li>{@code -1} - Means that
- * off-heap storage is disabled.</li> <li> {@code 0} - Ignite will not limit off-heap storage (it's up to user to
- * properly add and remove entries from cache to ensure that off-heap storage does not grow infinitely. </li>
- * <li>Any positive value specifies the limit of off-heap storage in bytes.</li> </ul> Default value is {@code -1},
- * specified by {@link #DFLT_OFFHEAP_MEMORY} constant which means that off-heap storage is disabled by default. <p>
- * Use off-heap storage to load gigabytes of data in memory without slowing down Garbage Collection. Essentially in
- * this case you should allocate very small amount of memory to JVM and Ignite will cache most of the data in
- * off-heap space without affecting JVM performance at all.
- *
- * @param offHeapMaxMem Maximum memory in bytes available to off-heap memory space.
- * @return {@code this} for chaining.
- */
- public CacheConfiguration<K, V> setOffHeapMaxMemory(long offHeapMaxMem) {
- this.offHeapMaxMem = offHeapMaxMem;
-
- return this;
- }
-
- /**
* Gets maximum number of query iterators that can be stored. Iterators are stored to
* support query pagination when each page of data is sent to user's node only on demand.
* Increase this property if you are running and processing lots of queries in parallel.
@@ -1696,28 +1484,6 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
}
/**
- * Gets memory mode for cache. Memory mode helps control whether value is stored in on-heap memory,
- * off-heap memory, or swap space. Refer to {@link CacheMemoryMode} for more info.
- *
- * @return Memory mode.
- */
- public CacheMemoryMode getMemoryMode() {
- return null;
- }
-
- /**
- * Sets memory mode for cache.
- *
- * @param memMode Memory mode.
- * @return {@code this} for chaining.
- */
- public CacheConfiguration<K, V> setMemoryMode(CacheMemoryMode memMode) {
- //this.memMode = memMode;
-
- return this;
- }
-
- /**
* Gets cache interceptor.
*
* @return Cache interceptor.
@@ -1998,31 +1764,6 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
}
/**
- * Number of SQL rows which will be cached onheap to avoid deserialization on each SQL index access.
- * This setting only makes sense when offheap is enabled for this cache.
- *
- * @return Cache size.
- * @see #setOffHeapMaxMemory(long)
- */
- public int getSqlOnheapRowCacheSize() {
- return sqlOnheapRowCacheSize;
- }
-
- /**
- * Number of SQL rows which will be cached onheap to avoid deserialization on each SQL index access.
- * This setting only makes sense when offheap is enabled for this cache.
- *
- * @param size Cache size.
- * @see #setOffHeapMaxMemory(long)
- * @return {@code this} for chaining.
- */
- public CacheConfiguration<K, V> setSqlOnheapRowCacheSize(int size) {
- this.sqlOnheapRowCacheSize = size;
-
- return this;
- }
-
- /**
* Gets array of cache plugin configurations.
*
* @return Cache plugin configurations.
@@ -2132,7 +1873,7 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
* @see #getQueryParallelism()
* @return {@code this} for chaining.
*/
- public CacheConfiguration<K,V> setQueryParallelism(int qryParallelism) {
+ public CacheConfiguration<K, V> setQueryParallelism(int qryParallelism) {
this.qryParallelism = qryParallelism;
return this;
@@ -2542,7 +2283,7 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
/**
* Filter that accepts all nodes.
*/
- public static class IgniteAllNodesPredicate implements IgnitePredicate<ClusterNode> {
+ public static class IgniteAllNodesPredicate implements IgnitePredicate<ClusterNode> {
/** */
private static final long serialVersionUID = 0L;
@@ -2799,7 +2540,7 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
if (descending) {
if (descendings == null)
- descendings = new HashSet<>();
+ descendings = new HashSet<>();
descendings.add(field);
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/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 db1eadf..a890f51 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
@@ -19,7 +19,6 @@ package org.apache.ignite.configuration;
import java.io.Serializable;
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.internal.util.typedef.internal.S;
@@ -108,21 +107,6 @@ public class CollectionConfiguration implements Serializable {
}
/**
- * @return Cache memory mode.
- */
- public CacheMemoryMode getMemoryMode() {
- return null;
- }
-
- /**
- * @param memoryMode Memory mode.
- * @return {@code this} for chaining.
- */
- public CollectionConfiguration setMemoryMode(CacheMemoryMode memoryMode) {
- return this;
- }
-
- /**
* @return Predicate specifying on which nodes the cache should be started.
*/
public IgnitePredicate<ClusterNode> getNodeFilter() {
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/main/java/org/apache/ignite/configuration/NearCacheConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/configuration/NearCacheConfiguration.java b/modules/core/src/main/java/org/apache/ignite/configuration/NearCacheConfiguration.java
index 7c948dc..0fc94655 100644
--- a/modules/core/src/main/java/org/apache/ignite/configuration/NearCacheConfiguration.java
+++ b/modules/core/src/main/java/org/apache/ignite/configuration/NearCacheConfiguration.java
@@ -71,7 +71,6 @@ public class NearCacheConfiguration<K, V> extends MutableConfiguration<K, V> {
*
* @return Near eviction policy.
* @see CacheConfiguration#getEvictionPolicy()
- * @see CacheConfiguration#isEvictSynchronized()
*/
public EvictionPolicy<K, V> getNearEvictionPolicy() {
return nearEvictPlc;
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoMessageFactory.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoMessageFactory.java b/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoMessageFactory.java
index ac3858c..8488d70 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoMessageFactory.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoMessageFactory.java
@@ -45,8 +45,6 @@ import org.apache.ignite.internal.processors.cache.CacheInvokeDirectResult;
import org.apache.ignite.internal.processors.cache.CacheObjectByteArrayImpl;
import org.apache.ignite.internal.processors.cache.CacheObjectImpl;
import org.apache.ignite.internal.processors.cache.GridCacheEntryInfo;
-import org.apache.ignite.internal.processors.cache.GridCacheEvictionRequest;
-import org.apache.ignite.internal.processors.cache.GridCacheEvictionResponse;
import org.apache.ignite.internal.processors.cache.GridCacheReturn;
import org.apache.ignite.internal.processors.cache.KeyCacheObjectImpl;
import org.apache.ignite.internal.processors.cache.binary.MetadataRequestMessage;
@@ -371,16 +369,6 @@ public class GridIoMessageFactory implements MessageFactory {
break;
- case 14:
- msg = new GridCacheEvictionRequest();
-
- break;
-
- case 15:
- msg = new GridCacheEvictionResponse();
-
- break;
-
case 16:
msg = new GridCacheTxRecoveryRequest();
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheEvictionManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheEvictionManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheEvictionManager.java
index d536a98..b614728 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheEvictionManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheEvictionManager.java
@@ -41,11 +41,6 @@ public interface CacheEvictionManager extends GridCacheManager {
public void touch(GridCacheEntryEx e, AffinityTopologyVersion topVer);
/**
- * Notifications.
- */
- public void unwind();
-
- /**
* @param entry Entry to attempt to evict.
* @param obsoleteVer Obsolete version.
* @param filter Optional entry filter.
@@ -60,19 +55,9 @@ public interface CacheEvictionManager extends GridCacheManager {
@Nullable CacheEntryPredicate[] filter) throws IgniteCheckedException;
/**
- * @return Current size of evict queue.
- */
- public int evictQueueSize();
-
- /**
* @param keys Keys to evict.
* @param obsoleteVer Obsolete version.
* @throws IgniteCheckedException In case of error.
*/
public void batchEvict(Collection<?> keys, @Nullable GridCacheVersion obsoleteVer) throws IgniteCheckedException;
-
- /**
- * @return {@code True} if either evicts or near evicts are synchronized, {@code false} otherwise.
- */
- public boolean evictSyncOrNearSync();
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheMetricsImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheMetricsImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheMetricsImpl.java
index eb63a60..aceef97 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheMetricsImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheMetricsImpl.java
@@ -236,7 +236,7 @@ public class CacheMetricsImpl implements CacheMetrics {
/** {@inheritDoc} */
@Override public long getOffHeapMaxSize() {
- return cctx.config().getOffHeapMaxMemory();
+ return 0;
}
/** {@inheritDoc} */
@@ -260,14 +260,7 @@ public class CacheMetricsImpl implements CacheMetrics {
/** {@inheritDoc} */
@Override public int getDhtEvictQueueCurrentSize() {
- GridCacheContext<?, ?> ctx = cctx.isNear() ? dhtCtx : cctx;
-
- if (ctx == null)
- return -1;
-
- CacheEvictionManager evictMgr = ctx.evicts();
-
- return evictMgr != null ? evictMgr.evictQueueSize() : -1;
+ return -1;
}
/** {@inheritDoc} */
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheOffheapEvictionManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheOffheapEvictionManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheOffheapEvictionManager.java
index e6a9ee7..99df39d 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheOffheapEvictionManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheOffheapEvictionManager.java
@@ -62,11 +62,6 @@ public class CacheOffheapEvictionManager extends GridCacheManagerAdapter impleme
}
/** {@inheritDoc} */
- @Override public void unwind() {
- // No-op.
- }
-
- /** {@inheritDoc} */
@Override public boolean evict(@Nullable GridCacheEntryEx entry,
@Nullable GridCacheVersion obsoleteVer,
boolean explicit,
@@ -75,17 +70,7 @@ public class CacheOffheapEvictionManager extends GridCacheManagerAdapter impleme
}
/** {@inheritDoc} */
- @Override public int evictQueueSize() {
- return 0;
- }
-
- /** {@inheritDoc} */
@Override public void batchEvict(Collection<?> keys, @Nullable GridCacheVersion obsoleteVer) {
// No-op.
}
-
- /** {@inheritDoc} */
- @Override public boolean evictSyncOrNearSync() {
- return false;
- }
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/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 92d7423..93daeda 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
@@ -693,7 +693,8 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V
}
/** {@inheritDoc} */
- @Override public final Iterable<Cache.Entry<K, V>> localEntries(CachePeekMode[] peekModes) throws IgniteCheckedException {
+ @Override public final Iterable<Cache.Entry<K, V>> localEntries(
+ CachePeekMode[] peekModes) throws IgniteCheckedException {
assert peekModes != null;
ctx.checkSecurity(SecurityPermission.CACHE_READ);
@@ -707,9 +708,19 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V
if (ctx.isLocal()) {
modes.primary = true;
modes.backup = true;
+ }
+
+ if (modes.offheap) {
+ if (modes.heap && modes.near && ctx.isNear())
+ its.add(ctx.near().nearEntries().iterator());
+
+ if (modes.primary || modes.backup) {
+ AffinityTopologyVersion topVer = ctx.affinity().affinityTopologyVersion();
- if (modes.heap)
- its.add(iterator(map.entries().iterator(), !keepBinary));
+ IgniteCacheOffheapManager offheapMgr = ctx.isNear() ? ctx.near().dht().context().offheap() : ctx.offheap();
+
+ its.add(offheapMgr.<K, V>entriesIterator(modes.primary, modes.backup, topVer, ctx.keepBinary()));
+ }
}
else if (modes.heap) {
if (modes.near && ctx.isNear())
@@ -722,16 +733,6 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V
}
}
- // Swap and offheap are disabled for near cache.
- if (modes.primary || modes.backup) {
- AffinityTopologyVersion topVer = ctx.affinity().affinityTopologyVersion();
-
- IgniteCacheOffheapManager offheapMgr = ctx.isNear() ? ctx.near().dht().context().offheap() : ctx.offheap();
-
- if (modes.offheap)
- its.add(offheapMgr.<K, V>entriesIterator(modes.primary, modes.backup, topVer, ctx.keepBinary()));
- }
-
final Iterator<Cache.Entry<K, V>> it = F.flatIterators(its);
return new Iterable<Cache.Entry<K, V>>() {
@@ -928,7 +929,7 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V
* @return Entry (never {@code null}).
*/
public final GridCacheEntryEx entryEx(Object key) {
- return entryEx(ctx.toCacheKeyObject(key), false);
+ return entryEx(ctx.toCacheKeyObject(key));
}
/**
@@ -936,20 +937,7 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V
* @return Entry (never {@code null}).
*/
public final GridCacheEntryEx entryEx(KeyCacheObject key) {
- return entryEx(key, false);
- }
-
- /**
- * @param key Entry key.
- * @param touch Whether created entry should be touched.
- * @return Entry (never {@code null}).
- */
- public GridCacheEntryEx entryEx(KeyCacheObject key, boolean touch) {
- GridCacheEntryEx e = entry0(key, ctx.affinity().affinityTopologyVersion(), true, touch);
-
- assert e != null;
-
- return e;
+ return entryEx(key, ctx.affinity().affinityTopologyVersion());
}
/**
@@ -958,7 +946,7 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V
* @return Entry (never {@code null}).
*/
public GridCacheEntryEx entryEx(KeyCacheObject key, AffinityTopologyVersion topVer) {
- GridCacheEntryEx e = entry0(key, topVer, true, false);
+ GridCacheEntryEx e = map.putEntryIfObsoleteOrAbsent(topVer, key, null, true, false);
assert e != null;
@@ -1007,11 +995,11 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V
}
/**
- * Gets entry set containing internal entries.
- *
- * @param filter Filter.
- * @return Entry set.
- */
+ * Gets entry set containing internal entries.
+ *
+ * @param filter Filter.
+ * @return Entry set.
+ */
@Override public final Set<Cache.Entry<K, V>> entrySetx(final CacheEntryPredicate... filter) {
boolean keepBinary = ctx.keepBinary();
@@ -2316,8 +2304,7 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V
*/
public IgniteInternalFuture<V> getAndPutAsync0(final K key,
final V val,
- @Nullable final CacheEntryPredicate filter)
- {
+ @Nullable final CacheEntryPredicate filter) {
return asyncOp(new AsyncOp<V>() {
@Override public IgniteInternalFuture<V> op(GridNearTxLocal tx, AffinityTopologyVersion readyTopVer) {
return tx.putAsync(ctx, readyTopVer, key, val, true, filter)
@@ -2873,7 +2860,7 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V
return syncOp(new SyncOp<V>(true) {
@Override public V op(GridNearTxLocal tx) throws IgniteCheckedException {
- K key0 = keepBinary ? (K) ctx.toCacheKeyObject(key) : key;
+ K key0 = keepBinary ? (K)ctx.toCacheKeyObject(key) : key;
V ret = tx.removeAllAsync(ctx,
null,
@@ -2883,9 +2870,9 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V
/*singleRmv*/false).get().value();
if (ctx.config().getInterceptor() != null) {
- K key = keepBinary ? (K) ctx.unwrapBinaryIfNeeded(key0, true, false) : key0;
+ K key = keepBinary ? (K)ctx.unwrapBinaryIfNeeded(key0, true, false) : key0;
- return (V) ctx.config().getInterceptor().onBeforeRemove(new CacheEntryImpl(key, ret)).get2();
+ return (V)ctx.config().getInterceptor().onBeforeRemove(new CacheEntryImpl(key, ret)).get2();
}
return ret;
@@ -2949,7 +2936,7 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V
do {
for (Iterator<CacheDataRow> it = ctx.offheap().iterator(true, true, null);
- it.hasNext() && keys.size() < REMOVE_ALL_KEYS_BATCH;)
+ it.hasNext() && keys.size() < REMOVE_ALL_KEYS_BATCH; )
keys.add((K)it.next().key());
removeAll(keys);
@@ -3484,7 +3471,7 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V
CacheObject cacheVal = ctx.toCacheObject(val);
- GridCacheEntryEx entry = entryEx(key, false);
+ GridCacheEntryEx entry = entryEx(key);
try {
entry.initialValue(cacheVal,
@@ -3818,7 +3805,7 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V
ctx.kernalContext().task().setThreadContext(TC_SUBGRID, nodes);
return ctx.kernalContext().task().execute(
- new PartitionSizeLongTask(ctx.name(), ctx.affinity().affinityTopologyVersion(), peekModes, part), null);
+ new PartitionSizeLongTask(ctx.name(), ctx.affinity().affinityTopologyVersion(), peekModes, part), null);
}
/** {@inheritDoc} */
@@ -3899,7 +3886,8 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V
}
/** {@inheritDoc} */
- @Override public Iterator<Cache.Entry<K, V>> scanIterator(boolean keepBinary, @Nullable IgniteBiPredicate<Object, Object> p)
+ @Override public Iterator<Cache.Entry<K, V>> scanIterator(boolean keepBinary,
+ @Nullable IgniteBiPredicate<Object, Object> p)
throws IgniteCheckedException {
return igniteIterator(keepBinary, p);
}
@@ -3927,7 +3915,8 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V
* @return Distributed ignite cache iterator.
* @throws IgniteCheckedException If failed.
*/
- private Iterator<Cache.Entry<K, V>> igniteIterator(boolean keepBinary, @Nullable IgniteBiPredicate<Object, Object> p)
+ private Iterator<Cache.Entry<K, V>> igniteIterator(boolean keepBinary,
+ @Nullable IgniteBiPredicate<Object, Object> p)
throws IgniteCheckedException {
GridCacheContext ctx0 = ctx.isNear() ? ctx.near().dht().context() : ctx;
@@ -4471,17 +4460,11 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V
GridCacheVersion obsoleteVer = ctx.versions().next();
- if (!ctx.evicts().evictSyncOrNearSync()) {
- try {
- ctx.evicts().batchEvict(keys, obsoleteVer);
- }
- catch (IgniteCheckedException e) {
- U.error(log, "Failed to perform batch evict for keys: " + keys, e);
- }
+ try {
+ ctx.evicts().batchEvict(keys, obsoleteVer);
}
- else {
- for (K k : keys)
- evictx(k, obsoleteVer, CU.empty0());
+ catch (IgniteCheckedException e) {
+ U.error(log, "Failed to perform batch evict for keys: " + keys, e);
}
}
@@ -4500,7 +4483,8 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V
* @return Cached value.
* @throws IgniteCheckedException If failed.
*/
- @Nullable public final V get(K key, boolean deserializeBinary, final boolean needVer) throws IgniteCheckedException {
+ @Nullable public final V get(K key, boolean deserializeBinary,
+ final boolean needVer) throws IgniteCheckedException {
String taskName = ctx.kernalContext().job().currentTaskName();
return get0(key, taskName, deserializeBinary, needVer);
@@ -5330,7 +5314,8 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V
* @param peekModes Cache peek modes.
* @param partition partition.
*/
- private PartitionSizeLongJob(String cacheName, AffinityTopologyVersion topVer, CachePeekMode[] peekModes, int partition) {
+ private PartitionSizeLongJob(String cacheName, AffinityTopologyVersion topVer, CachePeekMode[] peekModes,
+ int partition) {
super(cacheName, topVer);
this.peekModes = peekModes;
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAttributes.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAttributes.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAttributes.java
index 42a9cfe..292ea4a 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAttributes.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAttributes.java
@@ -205,20 +205,6 @@ public class GridCacheAttributes implements Serializable {
}
/**
- * @return Flag indicating whether eviction is synchronized.
- */
- public boolean evictSynchronized() {
- return ccfg.isEvictSynchronized();
- }
-
- /**
- * @return Maximum eviction overflow ratio.
- */
- public float evictMaxOverflowRatio() {
- return ccfg.getEvictMaxOverflowRatio();
- }
-
- /**
* @return Default lock timeout.
*/
public long defaultLockTimeout() {
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentMap.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentMap.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentMap.java
index 7d29d6c..debc65b 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentMap.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentMap.java
@@ -60,6 +60,7 @@ public interface GridCacheConcurrentMap {
/**
* Returns the number of key-value mappings in this map.
+ * It does not include entries from underlying data store.
*
* @return the number of key-value mappings in this map.
*/
@@ -68,6 +69,7 @@ public interface GridCacheConcurrentMap {
/**
* Returns the number of publicly available key-value mappings in this map.
* It excludes entries that are marked as deleted.
+ * It also does not include entries from underlying data store.
*
* @return the number of publicly available key-value mappings in this map.
*/
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentMapImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentMapImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentMapImpl.java
index 61624ff..10f5ca3 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentMapImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentMapImpl.java
@@ -113,8 +113,7 @@ public class GridCacheConcurrentMapImpl implements GridCacheConcurrentMap {
KeyCacheObject key,
@Nullable final CacheObject val,
final boolean create,
- final boolean touch)
- {
+ final boolean touch) {
GridCacheMapEntry cur = null;
GridCacheMapEntry created = null;
GridCacheMapEntry created0 = null;