You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by nt...@apache.org on 2016/02/01 15:21:37 UTC
[29/49] ignite git commit: IGNITE-2498: Finalization.
IGNITE-2498: Finalization.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/14a5f93b
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/14a5f93b
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/14a5f93b
Branch: refs/heads/ignite-2435
Commit: 14a5f93bfdb74cad9c2ff77d6c8f703a55abdd10
Parents: 5c76f80
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Fri Jan 29 13:10:48 2016 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Fri Jan 29 13:10:48 2016 +0300
----------------------------------------------------------------------
.../processors/cache/GridCacheMapEntry.java | 2 +-
.../GridCacheDeploymentOffHeapSelfTest.java | 4 +-
...ridCacheDeploymentOffHeapValuesSelfTest.java | 41 ++++++++++++++++++++
.../testsuites/IgniteCacheTestSuite3.java | 2 +
4 files changed, 46 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/14a5f93b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
index 19c1312..b258c73 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
@@ -3164,7 +3164,7 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
if (hasOffHeapPointer()) {
CacheObject val0 = cctx.fromOffheap(offHeapPointer(), tmp);
- if (!tmp && isPeerClassLoadingEnabled())
+ if (!tmp && cctx.kernalContext().config().isPeerClassLoadingEnabled())
val0.finishUnmarshal(cctx.cacheObjectContext(), cctx.deploy().globalLoader());
return val0;
http://git-wip-us.apache.org/repos/asf/ignite/blob/14a5f93b/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
index 1adc3b4..ed58c3e 100644
--- 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
@@ -21,7 +21,7 @@ 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;
+import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
/**
* Tests deployment with off-heap storage.
@@ -31,7 +31,7 @@ public class GridCacheDeploymentOffHeapSelfTest extends GridCacheDeploymentSelfT
@Override protected CacheConfiguration cacheConfiguration() throws Exception {
CacheConfiguration cacheCfg = super.cacheConfiguration();
- cacheCfg.setMemoryMode(OFFHEAP_VALUES);
+ cacheCfg.setMemoryMode(OFFHEAP_TIERED);
cacheCfg.setOffHeapMaxMemory(0);
cacheCfg.setAtomicityMode(TRANSACTIONAL);
cacheCfg.setNearConfiguration(new NearCacheConfiguration());
http://git-wip-us.apache.org/repos/asf/ignite/blob/14a5f93b/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
new file mode 100644
index 0000000..73d5183
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentOffHeapValuesSelfTest.java
@@ -0,0 +1,41 @@
+/*
+ * 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/14a5f93b/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 b86a33d..d82f0b7 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,6 +21,7 @@ import junit.framework.TestSuite;
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;
@@ -125,6 +126,7 @@ public class IgniteCacheTestSuite3 extends TestSuite {
suite.addTestSuite(GridCacheDeploymentSelfTest.class);
suite.addTestSuite(GridCacheDeploymentOffHeapSelfTest.class);
+ suite.addTestSuite(GridCacheDeploymentOffHeapValuesSelfTest.class);
suite.addTestSuite(GridCacheConditionalDeploymentSelfTest.class);
suite.addTestSuite(GridCacheAtomicEntryProcessorDeploymentSelfTest.class);
suite.addTestSuite(GridCacheTransactionalEntryProcessorDeploymentSelfTest.class);