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: # ignite-648: add debug info
Date Thu, 09 Jul 2015 18:45:30 GMT
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-648-putAll 71ce030fe -> 1d8e90ce3


# ignite-648: add debug info


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

Branch: refs/heads/ignite-648-putAll
Commit: 1d8e90ce3775a89eb5429b3b9f8329eded2c3cac
Parents: 71ce030
Author: ashutak <ashutak@gridgain.com>
Authored: Thu Jul 9 21:45:23 2015 +0300
Committer: ashutak <ashutak@gridgain.com>
Committed: Thu Jul 9 21:45:23 2015 +0300

----------------------------------------------------------------------
 ...achePartitionedMultiNodeFullApiSelfTest.java | 40 ++++++++++++++++++--
 1 file changed, 37 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1d8e90ce/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 6f6b7cb..790a5e7 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
@@ -69,20 +69,54 @@ public class GridCachePartitionedMultiNodeFullApiSelfTest extends GridCacheParti
 
         Map<Integer, Integer> putMap = new LinkedHashMap<>();
 
-        int size = 100;
+        final int size = 100;
 
         for (int i = 0; i < size; i++)
             putMap.put(i, i * i);
 
-        IgniteCache<Object, Object> c0 = grid(0).cache(null);
-        IgniteCache<Object, Object> c1 = grid(1).cache(null);
+        IgniteCache<Object, Object> c0 = grid(1).cache(null);
+        IgniteCache<Object, Object> c1 = grid(2).cache(null);
 
         c0.putAll(putMap);
 
         atomicClockModeDelay(c0);
 
+        Thread.sleep(10_000);
+
         c1.removeAll(putMap.keySet());
 
+        Thread.sleep(10_000);
+
+        Affinity<Object> affinity = grid(0).affinity(null);
+
+        for (int i = 0; i < size; i++) {
+            Collection<ClusterNode> nodes = affinity.mapKeyToPrimaryAndBackups(i);
+            System.out.print(">>>>>> Affinity for i=" + i + " ");
+
+            for (ClusterNode node : nodes)
+                System.out.print(node.id() + " ");
+
+            System.out.println();
+        }
+
+        for (int i = 0; i < gridCount(); i++) {
+            System.out.println("*********** Grid " + i + " ***************");
+
+            executeOnLocalOrRemoteJvm(grid(i).cache(null), new TestCacheRunnable<Object,
Object>() {
+                @Override public void run(Ignite ignite, IgniteCache<Object, Object>
cache) throws Exception {
+                    for (int i = 0; i < size; i++) {
+                        if (i==12)
+                            cache.get(i);
+
+                        System.out.println(">>>>> i=" + i + " v=" + cache.get(i));
+                    }
+
+                    for (Cache.Entry<Object, Object> entry : cache)
+                        System.out.println(">>>>> Entry=" + entry);
+                }
+            });
+        }
+
         for (int i = 0; i < size; i++) {
             assertNull(c0.get(i));
             assertNull(c1.get(i));


Mime
View raw message