You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by sb...@apache.org on 2015/03/03 09:54:34 UTC
[04/50] incubator-ignite git commit: #ignite-237: fix
GridCacheDhtEvictionSelfTest.
#ignite-237: fix GridCacheDhtEvictionSelfTest.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/f27e9d21
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/f27e9d21
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/f27e9d21
Branch: refs/heads/sprint-2
Commit: f27e9d216b0a612058f71730704eb1daf5b22544
Parents: 4a356f8
Author: ivasilinets <va...@gmail.com>
Authored: Thu Feb 26 09:29:55 2015 +0300
Committer: ivasilinets <va...@gmail.com>
Committed: Thu Feb 26 09:29:55 2015 +0300
----------------------------------------------------------------------
.../distributed/dht/GridCacheDhtEvictionSelfTest.java | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f27e9d21/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
index f8f8ff1..c253861 100644
--- 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
@@ -19,7 +19,7 @@ package org.apache.ignite.internal.processors.cache.distributed.dht;
import org.apache.ignite.*;
import org.apache.ignite.cache.*;
-import org.apache.ignite.cache.affinity.consistenthash.*;
+import org.apache.ignite.cache.affinity.rendezvous.CacheRendezvousAffinityFunction;
import org.apache.ignite.cache.eviction.fifo.*;
import org.apache.ignite.cluster.*;
import org.apache.ignite.configuration.*;
@@ -161,8 +161,9 @@ public class GridCacheDhtEvictionSelfTest extends GridCommonAbstractTest {
* @param idx Index.
* @return Affinity.
*/
- private CacheConsistentHashAffinityFunction affinity(int idx) {
- return (CacheConsistentHashAffinityFunction)grid(idx).jcache(null).getConfiguration(CacheConfiguration.class).getAffinity();
+ private CacheRendezvousAffinityFunction affinity(int idx) {
+ return (CacheRendezvousAffinityFunction)grid(idx).jcache(null).
+ getConfiguration(CacheConfiguration.class).getAffinity();
}
/**
@@ -170,9 +171,9 @@ public class GridCacheDhtEvictionSelfTest extends GridCommonAbstractTest {
* @return Primary node for the given key.
*/
private Collection<ClusterNode> keyNodes(Object key) {
- CacheConsistentHashAffinityFunction aff = affinity(0);
+ CacheRendezvousAffinityFunction aff = affinity(0);
- return aff.nodes(aff.partition(key), grid(0).cluster().nodes(), 1);
+ return aff.assignPartition(aff.partition(key), new ArrayList(grid(0).cluster().nodes()), 1, null);
}
/**