ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject incubator-ignite git commit: Merge remote-tracking branch 'remotes/origin/ignite-53' into ignite-99
Date Wed, 21 Jan 2015 09:35:17 GMT
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-99 fc4e8a942 -> aecaa0bc5


Merge remote-tracking branch 'remotes/origin/ignite-53' into ignite-99

Conflicts:
	modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAbstractFullApiSelfTest.java


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

Branch: refs/heads/ignite-99
Commit: aecaa0bc54797b153e9e923a82786acec34fd92d
Parents: fc4e8a9
Author: ivasilinets <ivasilinets@gridgain.com>
Authored: Wed Jan 21 12:34:58 2015 +0300
Committer: ivasilinets <ivasilinets@gridgain.com>
Committed: Wed Jan 21 12:34:58 2015 +0300

----------------------------------------------------------------------
 .../src/main/java/org/apache/ignite/IgniteCache.java  |  4 ----
 .../cache/GridCacheAbstractFullApiSelfTest.java       | 14 +++++++-------
 .../junits/common/GridCommonAbstractTest.java         |  2 +-
 3 files changed, 8 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aecaa0bc/modules/core/src/main/java/org/apache/ignite/IgniteCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/IgniteCache.java b/modules/core/src/main/java/org/apache/ignite/IgniteCache.java
index da3dd5a..46fa38a 100644
--- a/modules/core/src/main/java/org/apache/ignite/IgniteCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/IgniteCache.java
@@ -46,10 +46,6 @@ import java.util.concurrent.locks.*;
  *  data based on the optionally passed in arguments.
  * </li>
  * <li>
- *     Method {@link #affinity()} provides {@link org.apache.ignite.cache.affinity.CacheAffinityFunction}
service for information on
- *     data partitioning and mapping keys to grid nodes responsible for caching those keys.
- * </li>
- * <li>
  *     Method {@link #dataStructures()} provides {@link org.gridgain.grid.cache.datastructures.GridCacheDataStructures}
service for
  *     creating and working with distributed concurrent data structures, such as
  *     {@link IgniteAtomicLong}, {@link IgniteAtomicReference}, {@link org.gridgain.grid.cache.datastructures.GridCacheQueue},
etc.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aecaa0bc/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAbstractFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAbstractFullApiSelfTest.java
b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAbstractFullApiSelfTest.java
index 7367cb8..3f351cb 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAbstractFullApiSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAbstractFullApiSelfTest.java
@@ -1065,7 +1065,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
         assertEquals(exp, cache.get("key"));
 
         for (int i = 0; i < gridCount(); i++) {
-            if (cache(i).affinity().isPrimaryOrBackup(grid(i).localNode(), "key"))
+            if (affinity(i).isPrimaryOrBackup(grid(i).localNode(), "key"))
                 assertEquals(exp, peek(cache(i), "key"));
         }
     }
@@ -2329,7 +2329,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
                     GridCacheEntryEx<String, Integer> entry = cctx.isNear() ? cctx.near().dht().peekEx(key)
:
                         cctx.cache().peekEx(key);
 
-                    if (cache().affinity().mapKeyToPrimaryAndBackups(key).contains(grid(g).localNode()))
{
+                    if (affinity(0).mapKeyToPrimaryAndBackups(key).contains(grid(g).localNode()))
{
                         assertNotNull(entry);
                         assertTrue(entry.deleted());
                     }
@@ -2363,7 +2363,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
             for (int i = 0; i < cnt; i++) {
                 String key = String.valueOf(i);
 
-                if (cache().affinity().mapKeyToPrimaryAndBackups(key).contains(grid(g).localNode()))
+                if (affinity(0).mapKeyToPrimaryAndBackups(key).contains(grid(g).localNode()))
                     assertEquals((Integer)i, cache(g).peek(key));
                 else
                     assertNull(cache(g).peek(key));
@@ -3025,7 +3025,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
         List<Integer> keys = new ArrayList<>();
 
         for (int k = 0; k < 2; k++) {
-            while (!grid.cache(null).affinity().isPrimary(grid.localNode(), key))
+            while (!grid.affinity(null).isPrimary(grid.localNode(), key))
                 key++;
 
             keys.add(key);
@@ -3072,7 +3072,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
         int key = 0;
 
         for (int k = 0; k < 2; k++) {
-            while (!grid.cache(null).affinity().isPrimary(grid.localNode(), key))
+            while (!grid.affinity(null).isPrimary(grid.localNode(), key))
                 key++;
 
             keys.add(key);
@@ -3528,7 +3528,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
     public void testLockAsyncWithTimeoutEntry() throws Exception {
         if (lockingEnabled()) {
             // Put only to primary.
-            ClusterNode node = F.first(cache().affinity().mapKeyToPrimaryAndBackups("key"));
+            ClusterNode node = F.first(affinity(0).mapKeyToPrimaryAndBackups("key"));
 
             if (node == null)
                 throw new IgniteCheckedException("Failed to map key.");
@@ -5021,7 +5021,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
      * @throws Exception If failed.
      */
     protected GridCache<String, Integer> primaryCache(String key) throws Exception
{
-        ClusterNode node = cache().affinity().mapKeyToNode(key);
+        ClusterNode node = affinity(0).mapKeyToNode(key);
 
         if (node == null)
             throw new IgniteCheckedException("Failed to find primary node.");

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aecaa0bc/modules/core/src/test/java/org/gridgain/testframework/junits/common/GridCommonAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/testframework/junits/common/GridCommonAbstractTest.java
b/modules/core/src/test/java/org/gridgain/testframework/junits/common/GridCommonAbstractTest.java
index 29d4ec8..46c0b7d 100644
--- a/modules/core/src/test/java/org/gridgain/testframework/junits/common/GridCommonAbstractTest.java
+++ b/modules/core/src/test/java/org/gridgain/testframework/junits/common/GridCommonAbstractTest.java
@@ -514,7 +514,7 @@ public abstract class GridCommonAbstractTest extends GridAbstractTest
{
      * @return Cache.
      */
     protected <K, V> IgniteCache<K, V> primaryCache(Object key, @Nullable String
cacheName) {
-        ClusterNode node = grid(0).cache(cacheName).affinity().mapKeyToNode(key);
+        ClusterNode node = grid(0).affinity(cacheName).mapKeyToNode(key);
 
         assertNotNull(node);
 


Mime
View raw message