http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a67b72ca/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeEventsCollectorTask.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeEventsCollectorTask.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeEventsCollectorTask.java index 6e70d78..b280b04 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeEventsCollectorTask.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeEventsCollectorTask.java @@ -263,7 +263,7 @@ public class VisorNodeEventsCollectorTask extends VisorMultiNodeTask<VisorNodeEv @Override protected Collection<? extends VisorGridEvent> run(final VisorNodeEventsCollectorTaskArg arg) { final long startEvtTime = arg.timeArgument() == null ? 0L : System.currentTimeMillis() - arg.timeArgument(); - final ClusterNodeLocalMap<String, Long> nl = ignite.nodeLocalMap(); + final ClusterNodeLocalMap<String, Long> nl = ignite.cluster().nodeLocalMap(); final Long startEvtOrder = arg.keyOrder() != null && nl.containsKey(arg.keyOrder()) ? nl.get(arg.keyOrder()) : -1L;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a67b72ca/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodePingTask.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodePingTask.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodePingTask.java index ca70b7e..9987eba 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodePingTask.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodePingTask.java @@ -69,7 +69,7 @@ public class VisorNodePingTask extends VisorOneNodeTask<UUID, GridTuple3<Boolean @Override protected GridTuple3<Boolean, Long, Long> run(UUID nodeToPing) { long start = System.currentTimeMillis(); - return new GridTuple3<>(ignite.pingNode(nodeToPing), start, System.currentTimeMillis()); + return new GridTuple3<>(ignite.cluster().pingNode(nodeToPing), start, System.currentTimeMillis()); } /** {@inheritDoc} */ http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a67b72ca/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryCleanupTask.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryCleanupTask.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryCleanupTask.java index 060af20..fbc26bc 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryCleanupTask.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryCleanupTask.java @@ -85,7 +85,8 @@ public class VisorQueryCleanupTask extends VisorMultiNodeTask<Map<UUID, Collecti /** {@inheritDoc} */ @Override protected Void run(Collection<String> qryIds) { - ClusterNodeLocalMap<String, VisorQueryTask.VisorFutureResultSetHolder> locMap = ignite.nodeLocalMap(); + ClusterNodeLocalMap<String, VisorQueryTask.VisorFutureResultSetHolder> locMap = + ignite.cluster().nodeLocalMap(); for (String qryId : qryIds) locMap.remove(qryId); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a67b72ca/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryNextPageTask.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryNextPageTask.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryNextPageTask.java index 4788848..a33a1a9 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryNextPageTask.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryNextPageTask.java @@ -71,7 +71,8 @@ public class VisorQueryNextPageTask extends VisorOneNodeTask<IgniteBiTuple<Strin private VisorQueryResult nextSqlPage(IgniteBiTuple<String, Integer> arg) throws IgniteCheckedException { long start = U.currentTimeMillis(); - ClusterNodeLocalMap<String, VisorQueryTask.VisorFutureResultSetHolder<List<?>>> storage = ignite.nodeLocalMap(); + ClusterNodeLocalMap<String, VisorQueryTask.VisorFutureResultSetHolder<List<?>>> storage = + ignite.cluster().nodeLocalMap(); VisorQueryTask.VisorFutureResultSetHolder<List<?>> t = storage.get(arg.get1()); @@ -94,7 +95,8 @@ public class VisorQueryNextPageTask extends VisorOneNodeTask<IgniteBiTuple<Strin private VisorQueryResult nextScanPage(IgniteBiTuple<String, Integer> arg) throws IgniteCheckedException { long start = U.currentTimeMillis(); - ClusterNodeLocalMap<String, VisorQueryTask.VisorFutureResultSetHolder<Map.Entry<Object, Object>>> storage = ignite.nodeLocalMap(); + ClusterNodeLocalMap<String, VisorQueryTask.VisorFutureResultSetHolder<Map.Entry<Object, Object>>> storage = + ignite.cluster().nodeLocalMap(); VisorQueryTask.VisorFutureResultSetHolder<Map.Entry<Object, Object>> t = storage.get(arg.get1()); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a67b72ca/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryTask.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryTask.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryTask.java index f062ee1..30420f6 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryTask.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryTask.java @@ -207,7 +207,7 @@ public class VisorQueryTask extends VisorOneNodeTask<VisorQueryTask.VisorQueryAr if (scan) { CacheQueryFuture<Map.Entry<Object, Object>> fut = cp.queries().createScanQuery(null) .pageSize(arg.pageSize()) - .projection(ignite.forNodeIds(arg.proj())) + .projection(ignite.cluster().forNodeIds(arg.proj())) .execute(); long start = U.currentTimeMillis(); @@ -221,7 +221,7 @@ public class VisorQueryTask extends VisorOneNodeTask<VisorQueryTask.VisorQueryAr Map.Entry<Object, Object> next = rows.get2(); - ignite.<String, VisorFutureResultSetHolder>nodeLocalMap().put(qryId, + ignite.cluster().<String, VisorFutureResultSetHolder>nodeLocalMap().put(qryId, new VisorFutureResultSetHolder<>(fut, next, false)); scheduleResultSetHolderRemoval(qryId); @@ -233,7 +233,7 @@ public class VisorQueryTask extends VisorOneNodeTask<VisorQueryTask.VisorQueryAr CacheQueryFuture<List<?>> fut = ((GridCacheQueriesEx<?, ?>)cp.queries()) .createSqlFieldsQuery(arg.queryTxt(), true) .pageSize(arg.pageSize()) - .projection(ignite.forNodeIds(arg.proj())) + .projection(ignite.cluster().forNodeIds(arg.proj())) .execute(); List<Object> firstRow = (List<Object>)fut.next(); @@ -261,7 +261,7 @@ public class VisorQueryTask extends VisorOneNodeTask<VisorQueryTask.VisorQueryAr long duration = fut.duration() + fetchDuration; // Query duration + fetch duration. - ignite.<String, VisorFutureResultSetHolder>nodeLocalMap().put(qryId, + ignite.cluster().<String, VisorFutureResultSetHolder>nodeLocalMap().put(qryId, new VisorFutureResultSetHolder<>(fut, rows.get2(), false)); scheduleResultSetHolderRemoval(qryId); @@ -282,7 +282,7 @@ public class VisorQueryTask extends VisorOneNodeTask<VisorQueryTask.VisorQueryAr private void scheduleResultSetHolderRemoval(final String id) { ((IgniteKernal)ignite).context().timeout().addTimeoutObject(new GridTimeoutObjectAdapter(RMV_DELAY) { @Override public void onTimeout() { - ClusterNodeLocalMap<String, VisorFutureResultSetHolder> storage = ignite.nodeLocalMap(); + ClusterNodeLocalMap<String, VisorFutureResultSetHolder> storage = ignite.cluster().nodeLocalMap(); VisorFutureResultSetHolder<?> t = storage.get(id); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a67b72ca/modules/core/src/test/java/org/apache/ignite/IgniteCacheAffinitySelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/IgniteCacheAffinitySelfTest.java b/modules/core/src/test/java/org/apache/ignite/IgniteCacheAffinitySelfTest.java index 604d719..7186ae1 100644 --- a/modules/core/src/test/java/org/apache/ignite/IgniteCacheAffinitySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/IgniteCacheAffinitySelfTest.java @@ -250,6 +250,9 @@ public class IgniteCacheAffinitySelfTest extends IgniteCacheAbstractTest { /** * Check equal maps. + * + * @param map1 Map1. + * @param map2 Map2. */ private static void checkEqualMaps(Map<ClusterNode, Collection> map1, Map<ClusterNode, Collection> map2) { assertEquals(map1.size(), map2.size()); @@ -263,6 +266,9 @@ public class IgniteCacheAffinitySelfTest extends IgniteCacheAbstractTest { /** * Check equal maps. + * + * @param map1 Map1. + * @param map2 Map2. */ private static void checkEqualPartitionMaps(Map<Integer, ClusterNode> map1, Map<Integer, ClusterNode> map2) { assertEquals(map1.size(), map2.size()); @@ -278,6 +284,6 @@ public class IgniteCacheAffinitySelfTest extends IgniteCacheAbstractTest { * @return Cluster nodes. */ private Collection<ClusterNode> nodes() { - return grid(0).nodes(); + return grid(0).cluster().nodes(); } } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a67b72ca/modules/core/src/test/java/org/apache/ignite/internal/ClusterMetricsSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/ClusterMetricsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/ClusterMetricsSelfTest.java index 6c5b0c7..8b226ee 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/ClusterMetricsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/ClusterMetricsSelfTest.java @@ -68,7 +68,7 @@ public class ClusterMetricsSelfTest extends GridCommonAbstractTest { */ public void testEmptyProjection() throws Exception { try { - grid(0).forPredicate(F.<ClusterNode>alwaysFalse()).metrics(); + grid(0).cluster().forPredicate(F.<ClusterNode>alwaysFalse()).metrics(); assert false; } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a67b72ca/modules/core/src/test/java/org/apache/ignite/internal/GridJobMasterLeaveAwareSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridJobMasterLeaveAwareSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridJobMasterLeaveAwareSelfTest.java index 256ff1e..f25823a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridJobMasterLeaveAwareSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridJobMasterLeaveAwareSelfTest.java @@ -170,7 +170,7 @@ public class GridJobMasterLeaveAwareSelfTest extends GridCommonAbstractTest { int lastGridIdx = GRID_CNT - 1; - compute(grid(lastGridIdx).forPredicate(excludeLastPredicate())).withAsync(). + compute(grid(lastGridIdx).cluster().forPredicate(excludeLastPredicate())).withAsync(). execute(new TestTask(GRID_CNT - 1), null); jobLatch.await(); @@ -195,7 +195,7 @@ public class GridJobMasterLeaveAwareSelfTest extends GridCommonAbstractTest { int lastGridIdx = GRID_CNT - 1; - compute(grid(lastGridIdx).forPredicate(excludeLastPredicate())).withAsync(). + compute(grid(lastGridIdx).cluster().forPredicate(excludeLastPredicate())).withAsync(). execute(new TestTask(GRID_CNT - 1), null); jobLatch.await(); @@ -224,7 +224,7 @@ public class GridJobMasterLeaveAwareSelfTest extends GridCommonAbstractTest { int lastGridIdx = GRID_CNT - 1; - compute(grid(lastGridIdx).forPredicate(excludeLastPredicate())).withAsync(). + compute(grid(lastGridIdx).cluster().forPredicate(excludeLastPredicate())).withAsync(). execute(new TestTask(GRID_CNT - 1), null); jobLatch.await(); @@ -509,7 +509,7 @@ public class GridJobMasterLeaveAwareSelfTest extends GridCommonAbstractTest { int lastGridIdx = GRID_CNT - 1; - IgniteFuture<?> fut = taskStarter.apply(grid(lastGridIdx).forPredicate(excludeLastPredicate())); + IgniteFuture<?> fut = taskStarter.apply(grid(lastGridIdx).cluster().forPredicate(excludeLastPredicate())); jobLatch.await(); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a67b72ca/modules/core/src/test/java/org/apache/ignite/internal/GridMultipleJobsSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridMultipleJobsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridMultipleJobsSelfTest.java index 6c11ef6..24a117c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridMultipleJobsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridMultipleJobsSelfTest.java @@ -53,7 +53,7 @@ public class GridMultipleJobsSelfTest extends GridCommonAbstractTest { startGrid(1); startGrid(2); - assertEquals(2, grid(1).nodes().size()); + assertEquals(2, grid(1).cluster().nodes().size()); } /** {@inheritDoc} */ http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a67b72ca/modules/core/src/test/java/org/apache/ignite/internal/GridProjectionSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridProjectionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridProjectionSelfTest.java index 1f749e6..92387a2 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridProjectionSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridProjectionSelfTest.java @@ -63,7 +63,7 @@ public class GridProjectionSelfTest extends GridProjectionAbstractTest { /** {@inheritDoc} */ @Override protected ClusterGroup projection() { - return grid(0).forPredicate(F.nodeForNodeIds(ids)); + return grid(0).cluster().forPredicate(F.nodeForNodeIds(ids)); } /** {@inheritDoc} */ http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a67b72ca/modules/core/src/test/java/org/apache/ignite/internal/GridSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridSelfTest.java index 7830b42..bda4c21 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridSelfTest.java @@ -50,7 +50,7 @@ public class GridSelfTest extends GridProjectionAbstractTest { /** {@inheritDoc} */ @Override protected ClusterGroup projection() { - return grid(0); + return grid(0).cluster(); } /** {@inheritDoc} */ @@ -60,7 +60,7 @@ public class GridSelfTest extends GridProjectionAbstractTest { /** {@inheritDoc} */ @Override protected Collection<UUID> remoteNodeIds() { - return F.nodeIds(grid(0).forRemotes().nodes()); + return F.nodeIds(grid(0).cluster().forRemotes().nodes()); } /** {@inheritDoc} */ @@ -112,7 +112,7 @@ public class GridSelfTest extends GridProjectionAbstractTest { public void testAsyncListen() throws Exception { final String msg = "HELLO!"; - Ignite g = (Ignite)projection(); + Ignite g = grid(0); final UUID locNodeId = g.cluster().localNode().id(); @@ -128,8 +128,7 @@ public class GridSelfTest extends GridProjectionAbstractTest { final AtomicInteger cnt = new AtomicInteger(); g.message().localListen(null, new P2<UUID, String>() { - @Override - public boolean apply(UUID nodeId, String msg) { + @Override public boolean apply(UUID nodeId, String msg) { if (!locNodeId.equals(nodeId)) cnt.incrementAndGet(); @@ -153,7 +152,7 @@ public class GridSelfTest extends GridProjectionAbstractTest { ClusterNode node2 = grid(2).localNode(); ClusterNode node3 = grid(3).localNode(); - ClusterGroup p1 = grid(0).forOthers(node0); + ClusterGroup p1 = grid(0).cluster().forOthers(node0); assertEquals(3, p1.nodes().size()); @@ -161,6 +160,6 @@ public class GridSelfTest extends GridProjectionAbstractTest { assertEquals(1, p1.forOthers(node1, node2).nodes().size()); - assertEquals(1, grid(0).forOthers(node1, node2, node3).nodes().size()); + assertEquals(1, grid(0).cluster().forOthers(node1, node2, node3).nodes().size()); } } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a67b72ca/modules/core/src/test/java/org/apache/ignite/internal/processors/affinity/GridAffinityProcessorAbstractSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/affinity/GridAffinityProcessorAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/affinity/GridAffinityProcessorAbstractSelfTest.java index f3d297c..038e26f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/affinity/GridAffinityProcessorAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/affinity/GridAffinityProcessorAbstractSelfTest.java @@ -114,8 +114,8 @@ public abstract class GridAffinityProcessorAbstractSelfTest extends GridCommonAb final IgniteKernal grid1 = (IgniteKernal)grid(rnd.nextInt(NODES_CNT)); // With cache. IgniteKernal grid2 = (IgniteKernal)grid(NODES_CNT + rnd.nextInt(NODES_CNT)); // Without cache. - assertEquals(NODES_CNT * 2, grid1.nodes().size()); - assertEquals(NODES_CNT * 2, grid2.nodes().size()); + assertEquals(NODES_CNT * 2, grid1.cluster().nodes().size()); + assertEquals(NODES_CNT * 2, grid2.cluster().nodes().size()); GridTestUtils.assertThrows(log, new Callable<Void>() { @Override public Void call() throws Exception { @@ -187,7 +187,8 @@ public abstract class GridAffinityProcessorAbstractSelfTest extends GridCommonAb long diff = System.currentTimeMillis() - start; - info(">>> Map " + keysSize + " keys to " + grid.nodes().size() + " nodes " + iterations + " times in " + diff + "ms."); + info(">>> Map " + keysSize + " keys to " + grid.cluster().nodes().size() + + " nodes " + iterations + " times in " + diff + "ms."); assertTrue(diff < 25000); } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a67b72ca/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 f36a018..c5b4dc8 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 @@ -182,7 +182,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract map.put("key" + i, i); // Put in primary nodes to avoid near readers which will prevent entry from being cleared. - Map<ClusterNode, Collection<String>> mapped = grid(0).mapKeysToNodes(null, map.keySet()); + Map<ClusterNode, Collection<String>> mapped = grid(0).cluster().mapKeysToNodes(null, map.keySet()); for (int i = 0; i < gridCount(); i++) { Collection<String> keys = mapped.get(grid(i).localNode()); @@ -195,7 +195,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract map.remove("key0"); - mapped = grid(0).mapKeysToNodes(null, map.keySet()); + mapped = grid(0).cluster().mapKeysToNodes(null, map.keySet()); for (int i = 0; i < gridCount(); i++) { // Will actually delete entry from map. @@ -538,7 +538,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract public void testPutTx() throws Exception { if (txEnabled()) { IgniteCache<String, Integer> cache = jcache(); - + try (Transaction tx = transactions().txStart()) { assert cache.getAndPut("key1", 1) == null; assert cache.getAndPut("key2", 2) == null; @@ -554,7 +554,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract assert cache.get("key1") != null; assert cache.get("key2") != null; assert cache.get("wrong") == null; - + tx.commit(); } @@ -1161,7 +1161,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract try { cache.put("key1", 1); cache.put("key2", 2); - + // Check inside transaction. assert cache.get("key1") == 1; assert cache.get("key2") == 2; @@ -1196,25 +1196,25 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract try { jcache().put("key2", 1); - + cacheAsync.put("key1", 10); - + IgniteFuture<?> fut1 = cacheAsync.future(); - + cacheAsync.put("key2", 11); - + IgniteFuture<?> fut2 = cacheAsync.future(); - + IgniteFuture<Transaction> f = null; - + if (tx != null) { tx = (Transaction)tx.withAsync(); - + tx.commit(); f = tx.future(); } - + fut1.get(); fut2.get(); @@ -2977,7 +2977,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract String key = "1"; int ttl = 500; - try (Transaction tx = grid(0).ignite().transactions().txStart()) { + try (Transaction tx = grid(0).transactions().txStart()) { final ExpiryPolicy expiry = new TouchedExpiryPolicy(new Duration(MILLISECONDS, ttl)); grid(0).jcache(null).withExpiryPolicy(expiry).put(key, 1); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a67b72ca/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityApiSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityApiSelfTest.java index 4b58f70..a82b923 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityApiSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityApiSelfTest.java @@ -97,11 +97,11 @@ public class GridCacheAffinityApiSelfTest extends GridCacheAbstractSelfTest { */ public void testPrimaryPartitionsOneNode() throws Exception { CacheAffinityFunctionContext ctx = - new GridCacheAffinityFunctionContextImpl(new ArrayList<>(grid(0).nodes()), null, null, 1, 1); + new GridCacheAffinityFunctionContextImpl(new ArrayList<>(grid(0).cluster().nodes()), null, null, 1, 1); List<List<ClusterNode>> assignment = affinity().assignPartitions(ctx); - for (ClusterNode node : grid(0).nodes()) { + for (ClusterNode node : grid(0).cluster().nodes()) { int[] parts = grid(0).affinity(null).primaryPartitions(node); assert !F.isEmpty(parts); @@ -139,7 +139,7 @@ public class GridCacheAffinityApiSelfTest extends GridCacheAbstractSelfTest { assert !F.isEmpty(parts); CacheAffinityFunctionContext ctx = - new GridCacheAffinityFunctionContextImpl(new ArrayList<>(grid(0).nodes()), null, null, 1, 1); + new GridCacheAffinityFunctionContextImpl(new ArrayList<>(grid(0).cluster().nodes()), null, null, 1, 1); List<List<ClusterNode>> assignment = affinity().assignPartitions(ctx); @@ -169,7 +169,7 @@ public class GridCacheAffinityApiSelfTest extends GridCacheAbstractSelfTest { assert !F.isEmpty(parts); CacheAffinityFunctionContext ctx = - new GridCacheAffinityFunctionContextImpl(new ArrayList<>(grid(0).nodes()), null, null, 1, 1); + new GridCacheAffinityFunctionContextImpl(new ArrayList<>(grid(0).cluster().nodes()), null, null, 1, 1); List<List<ClusterNode>> assignment = affinity().assignPartitions(ctx); @@ -202,7 +202,7 @@ public class GridCacheAffinityApiSelfTest extends GridCacheAbstractSelfTest { assert !F.isEmpty(parts); CacheAffinityFunctionContext ctx = - new GridCacheAffinityFunctionContextImpl(new ArrayList<>(grid(0).nodes()), null, null, 1, 1); + new GridCacheAffinityFunctionContextImpl(new ArrayList<>(grid(0).cluster().nodes()), null, null, 1, 1); List<List<ClusterNode>> assignment = affinity().assignPartitions(ctx); @@ -224,7 +224,7 @@ public class GridCacheAffinityApiSelfTest extends GridCacheAbstractSelfTest { int part = RND.nextInt(affinity().partitions()); CacheAffinityFunctionContext ctx = - new GridCacheAffinityFunctionContextImpl(new ArrayList<>(grid(0).nodes()), null, null, 1, 1); + new GridCacheAffinityFunctionContextImpl(new ArrayList<>(grid(0).cluster().nodes()), null, null, 1, 1); CacheAffinityFunction aff = affinity(); @@ -242,7 +242,7 @@ public class GridCacheAffinityApiSelfTest extends GridCacheAbstractSelfTest { Map<Integer, ClusterNode> map = grid(0).affinity(null).mapPartitionsToNodes(F.asList(0, 1, 5, 19, 12)); CacheAffinityFunctionContext ctx = - new GridCacheAffinityFunctionContextImpl(new ArrayList<>(grid(0).nodes()), null, null, 1, 1); + new GridCacheAffinityFunctionContextImpl(new ArrayList<>(grid(0).cluster().nodes()), null, null, 1, 1); CacheAffinityFunction aff = affinity(); @@ -261,7 +261,7 @@ public class GridCacheAffinityApiSelfTest extends GridCacheAbstractSelfTest { Map<Integer, ClusterNode> map = grid(0).affinity(null).mapPartitionsToNodes(F.asList(0, 1, 5, 19, 12)); CacheAffinityFunctionContext ctx = - new GridCacheAffinityFunctionContextImpl(new ArrayList<>(grid(0).nodes()), null, null, 1, 1); + new GridCacheAffinityFunctionContextImpl(new ArrayList<>(grid(0).cluster().nodes()), null, null, 1, 1); CacheAffinityFunction aff = affinity(); @@ -285,7 +285,7 @@ public class GridCacheAffinityApiSelfTest extends GridCacheAbstractSelfTest { Map<Integer, ClusterNode> map = grid(0).affinity(null).mapPartitionsToNodes(parts); CacheAffinityFunctionContext ctx = - new GridCacheAffinityFunctionContextImpl(new ArrayList<>(grid(0).nodes()), null, null, 1, 1); + new GridCacheAffinityFunctionContextImpl(new ArrayList<>(grid(0).cluster().nodes()), null, null, 1, 1); CacheAffinityFunction aff = affinity(); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a67b72ca/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheEntryMemorySizeSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheEntryMemorySizeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheEntryMemorySizeSelfTest.java index c3f77bc..777c2ab 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheEntryMemorySizeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheEntryMemorySizeSelfTest.java @@ -188,7 +188,7 @@ public class GridCacheEntryMemorySizeSelfTest extends GridCommonAbstractTest { while (true) { key++; - if (grid(0).mapKeyToNode(null, key).equals(grid(0).localNode())) { + if (grid(0).cluster().mapKeyToNode(null, key).equals(grid(0).localNode())) { if (i > 0) jcache(0).put(key, new Value(new byte[i * 1024])); @@ -242,7 +242,7 @@ public class GridCacheEntryMemorySizeSelfTest extends GridCommonAbstractTest { while (true) { key++; - if (grid(0).mapKeyToNode(null, key).equals(grid(0).localNode())) { + if (grid(0).cluster().mapKeyToNode(null, key).equals(grid(0).localNode())) { if (i > 0) jcache(0).put(key, new Value(new byte[i * 1024])); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a67b72ca/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMixedPartitionExchangeSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMixedPartitionExchangeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMixedPartitionExchangeSelfTest.java index d6cbfda..fc6bb98 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMixedPartitionExchangeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMixedPartitionExchangeSelfTest.java @@ -129,7 +129,7 @@ public class GridCacheMixedPartitionExchangeSelfTest extends GridCommonAbstractT fut.get(); - long topVer = grid(0).topologyVersion(); + long topVer = grid(0).cluster().topologyVersion(); assertEquals(29, topVer); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a67b72ca/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueJoinedNodeSelfAbstractTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueJoinedNodeSelfAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueJoinedNodeSelfAbstractTest.java index d1c37d0..96a49a6 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueJoinedNodeSelfAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueJoinedNodeSelfAbstractTest.java @@ -66,7 +66,7 @@ public abstract class GridCacheQueueJoinedNodeSelfAbstractTest extends IgniteCol PutJob putJob = new PutJob(queueName); - IgniteCompute comp = compute(grid(0).forLocal()).withAsync(); + IgniteCompute comp = compute(grid(0).cluster().forLocal()).withAsync(); comp.run(putJob); @@ -85,7 +85,7 @@ public abstract class GridCacheQueueJoinedNodeSelfAbstractTest extends IgniteCol jobs.add(job); - comp = compute(grid(i).forLocal()).withAsync(); + comp = compute(grid(i).cluster().forLocal()).withAsync(); comp.call(job); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a67b72ca/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueMultiNodeAbstractSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueMultiNodeAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueMultiNodeAbstractSelfTest.java index 75dcbe4..3b2997a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueMultiNodeAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueMultiNodeAbstractSelfTest.java @@ -472,10 +472,10 @@ public abstract class GridCacheQueueMultiNodeAbstractSelfTest extends IgniteColl assertEquals(GRID_CNT * RETRIES, queue.size()); - Collection<ClusterNode> nodes = grid(0).nodes(); + Collection<ClusterNode> nodes = grid(0).cluster().nodes(); for (ClusterNode node : nodes) { - Collection<Integer> queueElements = compute(grid(0).forNode(node)).call(new IgniteCallable<Collection<Integer>>() { + Collection<Integer> queueElements = compute(grid(0).cluster().forNode(node)).call(new IgniteCallable<Collection<Integer>>() { @IgniteInstanceResource private Ignite grid; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a67b72ca/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheSequenceMultiNodeAbstractSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheSequenceMultiNodeAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheSequenceMultiNodeAbstractSelfTest.java index ee515ef..fe67880 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheSequenceMultiNodeAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheSequenceMultiNodeAbstractSelfTest.java @@ -56,7 +56,7 @@ public abstract class GridCacheSequenceMultiNodeAbstractSelfTest extends IgniteA String seqName = UUID.randomUUID().toString(); for (int i = 0; i < GRID_CNT; i++) { - Set<Long> retVal = compute(grid(i).forLocal()). + Set<Long> retVal = compute(grid(i).cluster().forLocal()). call(new IncrementAndGetJob(seqName, RETRIES)); for (Long l : retVal) @@ -91,7 +91,7 @@ public abstract class GridCacheSequenceMultiNodeAbstractSelfTest extends IgniteA String seqName = UUID.randomUUID().toString(); for (int i = 0; i < GRID_CNT; i++) { - Set<Long> retVal = compute(grid(i).forLocal()). + Set<Long> retVal = compute(grid(i).cluster().forLocal()). call(new GetAndIncrementJob(seqName, RETRIES)); for (Long l : retVal) http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a67b72ca/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 8f6f066..e6039a8 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 @@ -203,7 +203,7 @@ public class GridCachePartitionedQueueEntryMoveSelfTest extends IgniteCollection int part = aff.partition(mapper.affinityKey(queueName)); - Collection<ClusterNode> nodes = grid(0).nodes(); + Collection<ClusterNode> nodes = grid(0).cluster().nodes(); Collection<ClusterNode> aff0 = ignite(0).affinity(null).mapKeyToPrimaryAndBackups(queueName); Collection<ClusterNode> aff1 = nodes(aff, part, nodes); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a67b72ca/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEntrySelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEntrySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEntrySelfTest.java index 8e65e59..a1eb4e3 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEntrySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEntrySelfTest.java @@ -299,7 +299,7 @@ public class GridCacheDhtEntrySelfTest extends GridCommonAbstractTest { assert primary != null; - Collection<ClusterNode> nodes = new ArrayList<>(grid(0).nodes()); + Collection<ClusterNode> nodes = new ArrayList<>(grid(0).cluster().nodes()); nodes.remove(primary); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a67b72ca/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 2cd7797..5a6cd22 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 @@ -178,7 +178,7 @@ public class GridCacheDhtEvictionNearReadersSelfTest extends GridCommonAbstractT private Collection<ClusterNode> keyNodes(Object key) { CacheConsistentHashAffinityFunction aff = affinity(0); - return aff.nodes(aff.partition(key), grid(0).nodes(), 1); + return aff.nodes(aff.partition(key), grid(0).cluster().nodes(), 1); } /** @@ -218,7 +218,7 @@ public class GridCacheDhtEvictionNearReadersSelfTest extends GridCommonAbstractT assert backup != null; // Now calculate other node that doesn't own the key. - nodes = new ArrayList<>(grid(0).nodes()); + nodes = new ArrayList<>(grid(0).cluster().nodes()); nodes.remove(primary); nodes.remove(backup); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a67b72ca/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 efcf07d..f8f8ff1 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 @@ -172,7 +172,7 @@ public class GridCacheDhtEvictionSelfTest extends GridCommonAbstractTest { private Collection<ClusterNode> keyNodes(Object key) { CacheConsistentHashAffinityFunction aff = affinity(0); - return aff.nodes(aff.partition(key), grid(0).nodes(), 1); + return aff.nodes(aff.partition(key), grid(0).cluster().nodes(), 1); } /** http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a67b72ca/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtInternalEntrySelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtInternalEntrySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtInternalEntrySelfTest.java index 3cdc844..f88c080 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtInternalEntrySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtInternalEntrySelfTest.java @@ -185,7 +185,7 @@ public class GridCacheDhtInternalEntrySelfTest extends GridCommonAbstractTest { assert primary != null; - Collection<ClusterNode> nodes = new ArrayList<>(grid(0).nodes()); + Collection<ClusterNode> nodes = new ArrayList<>(grid(0).cluster().nodes()); nodes.remove(primary); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a67b72ca/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearMultiNodeSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearMultiNodeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearMultiNodeSelfTest.java index 78659a2..3d67051 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearMultiNodeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearMultiNodeSelfTest.java @@ -251,7 +251,7 @@ public class GridCacheNearMultiNodeSelfTest extends GridCommonAbstractTest { Map<UUID, T2<Set<Integer>, Set<Integer>>> map = mapKeys(cnt); - for (ClusterNode n : grid(0).nodes()) { + for (ClusterNode n : grid(0).cluster().nodes()) { Set<Integer> primary = map.get(n.id()).get1(); Set<Integer> backups = map.get(n.id()).get2(); @@ -668,7 +668,7 @@ public class GridCacheNearMultiNodeSelfTest extends GridCommonAbstractTest { lock.lock(); try { - long topVer = grid(0).topologyVersion(); + long topVer = grid(0).cluster().topologyVersion(); GridNearCacheEntry<Integer, String> nearEntry1 = nearEntry(0, key); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a67b72ca/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 1a5b3f2..9cc7ed9 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 @@ -129,8 +129,8 @@ public class GridCacheNearReadersSelfTest extends GridCommonAbstractTest { startGrids(); - ClusterNode n1 = F.first(aff.nodes(aff.partition(1), grid(0).nodes())); - ClusterNode n2 = F.first(aff.nodes(aff.partition(2), grid(0).nodes())); + ClusterNode n1 = F.first(aff.nodes(aff.partition(1), grid(0).cluster().nodes())); + ClusterNode n2 = F.first(aff.nodes(aff.partition(2), grid(0).cluster().nodes())); assertNotNull(n1); assertNotNull(n2); @@ -202,8 +202,8 @@ public class GridCacheNearReadersSelfTest extends GridCommonAbstractTest { startGrids(); - ClusterNode n1 = F.first(aff.nodes(aff.partition(1), grid(0).nodes())); - ClusterNode n2 = F.first(aff.nodes(aff.partition(2), grid(0).nodes())); + ClusterNode n1 = F.first(aff.nodes(aff.partition(1), grid(0).cluster().nodes())); + ClusterNode n2 = F.first(aff.nodes(aff.partition(2), grid(0).cluster().nodes())); assertNotNull(n1); assertNotNull(n2); @@ -375,7 +375,7 @@ public class GridCacheNearReadersSelfTest extends GridCommonAbstractTest { startGrids(); - Collection<ClusterNode> nodes = new ArrayList<>(aff.nodes(aff.partition(1), grid(0).nodes())); + Collection<ClusterNode> nodes = new ArrayList<>(aff.nodes(aff.partition(1), grid(0).cluster().nodes())); ClusterNode primary = F.first(nodes); @@ -425,12 +425,12 @@ public class GridCacheNearReadersSelfTest extends GridCommonAbstractTest { int key1 = 3; String val1 = Integer.toString(key1); - assertEquals(grid(0).localNode(), F.first(aff.nodes(aff.partition(key1), grid(0).nodes()))); + assertEquals(grid(0).localNode(), F.first(aff.nodes(aff.partition(key1), grid(0).cluster().nodes()))); int key2 = 1; String val2 = Integer.toString(key2); - assertEquals(grid(1).localNode(), F.first(aff.nodes(aff.partition(key2), grid(1).nodes()))); + assertEquals(grid(1).localNode(), F.first(aff.nodes(aff.partition(key2), grid(1).cluster().nodes()))); IgniteCache<Integer, String> cache = jcache(0); @@ -507,12 +507,12 @@ public class GridCacheNearReadersSelfTest extends GridCommonAbstractTest { int key1 = 3; String val1 = Integer.toString(key1); - assertEquals(grid(0).localNode(), F.first(aff.nodes(aff.partition(key1), grid(0).nodes()))); + assertEquals(grid(0).localNode(), F.first(aff.nodes(aff.partition(key1), grid(0).cluster().nodes()))); int key2 = 1; String val2 = Integer.toString(key2); - assertEquals(grid(1).localNode(), F.first(aff.nodes(aff.partition(key2), grid(1).nodes()))); + assertEquals(grid(1).localNode(), F.first(aff.nodes(aff.partition(key2), grid(1).cluster().nodes()))); IgniteCache<Integer, String> cache = jcache(0); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a67b72ca/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedBasicStoreMultiNodeSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedBasicStoreMultiNodeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedBasicStoreMultiNodeSelfTest.java index c284c29..ebefc7b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedBasicStoreMultiNodeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedBasicStoreMultiNodeSelfTest.java @@ -132,7 +132,7 @@ public class GridCachePartitionedBasicStoreMultiNodeSelfTest extends GridCommonA while (true) { boolean found = false; - for (ClusterNode n : grid(0).nodes()) { + for (ClusterNode n : grid(0).cluster().nodes()) { if (grid(0).affinity(null).isPrimary(n, key)) { found = true; @@ -160,7 +160,7 @@ public class GridCachePartitionedBasicStoreMultiNodeSelfTest extends GridCommonA while (true) { boolean found = false; - for (ClusterNode n : grid(0).nodes()) { + for (ClusterNode n : grid(0).cluster().nodes()) { if (grid(0).affinity(null).isBackup(n, key)) { found = true; @@ -188,7 +188,7 @@ public class GridCachePartitionedBasicStoreMultiNodeSelfTest extends GridCommonA while (true) { boolean found = false; - for (ClusterNode n : grid(0).nodes()) { + for (ClusterNode n : grid(0).cluster().nodes()) { if (!grid(0).affinity(null).isPrimaryOrBackup(n, key)) { found = true; @@ -216,7 +216,7 @@ public class GridCachePartitionedBasicStoreMultiNodeSelfTest extends GridCommonA while (true) { boolean found = false; - for (ClusterNode n : grid(0).nodes()) { + for (ClusterNode n : grid(0).cluster().nodes()) { if (grid(0).affinity(null).isPrimary(n, key)) { found = true; @@ -244,7 +244,7 @@ public class GridCachePartitionedBasicStoreMultiNodeSelfTest extends GridCommonA while (true) { boolean found = false; - for (ClusterNode n : grid(0).nodes()) { + for (ClusterNode n : grid(0).cluster().nodes()) { if (grid(0).affinity(null).isBackup(n, key)) { found = true; @@ -272,7 +272,7 @@ public class GridCachePartitionedBasicStoreMultiNodeSelfTest extends GridCommonA while (true) { boolean found = false; - for (ClusterNode n : grid(0).nodes()) { + for (ClusterNode n : grid(0).cluster().nodes()) { if (!grid(0).affinity(null).isPrimaryOrBackup(n, key)) { found = true; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a67b72ca/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedExplicitLockNodeFailureSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedExplicitLockNodeFailureSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedExplicitLockNodeFailureSelfTest.java index a97abec..655008c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedExplicitLockNodeFailureSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedExplicitLockNodeFailureSelfTest.java @@ -91,10 +91,10 @@ public class GridCachePartitionedExplicitLockNodeFailureSelfTest extends GridCom Integer key = 0; - while (grid(idx).mapKeyToNode(null, key).id().equals(grid(0).localNode().id())) + while (grid(idx).cluster().mapKeyToNode(null, key).id().equals(grid(0).localNode().id())) key++; - ClusterNode node = grid(idx).mapKeyToNode(null, key); + ClusterNode node = grid(idx).cluster().mapKeyToNode(null, key); info("Primary node for key [id=" + node.id() + ", order=" + node.order() + ", key=" + key + ']'); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a67b72ca/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 733c58e..c7903df 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 @@ -57,7 +57,7 @@ public class GridCachePartitionedMultiNodeFullApiSelfTest extends GridCacheParti * @return Affinity nodes for this cache. */ public Collection<ClusterNode> affinityNodes() { - return grid(0).nodes(); + return grid(0).cluster().nodes(); } /** http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a67b72ca/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedQueryMultiThreadedSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedQueryMultiThreadedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedQueryMultiThreadedSelfTest.java index 6b07a90..afa1fc4 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedQueryMultiThreadedSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedQueryMultiThreadedSelfTest.java @@ -138,7 +138,7 @@ public class GridCachePartitionedQueryMultiThreadedSelfTest extends GridCommonAb assertEquals(4, cache0.size()); - assert grid(0).nodes().size() == GRID_CNT; + assert grid(0).cluster().nodes().size() == GRID_CNT; final AtomicBoolean done = new AtomicBoolean(); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a67b72ca/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/preloader/GridCacheReplicatedPreloadLifecycleSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/preloader/GridCacheReplicatedPreloadLifecycleSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/preloader/GridCacheReplicatedPreloadLifecycleSelfTest.java index 44d8d80..6c417d3 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/preloader/GridCacheReplicatedPreloadLifecycleSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/preloader/GridCacheReplicatedPreloadLifecycleSelfTest.java @@ -183,7 +183,7 @@ public class GridCacheReplicatedPreloadLifecycleSelfTest extends GridCachePreloa final int i0 = j; final int j0 = i; - qry = qry.projection(grid(j)); + qry = qry.projection(grid(j).cluster()); int totalCnt = F.sumInt(qry.execute(new IgniteReducer<Map.Entry<Object, MyValue>, Integer>() { @IgniteInstanceResource http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a67b72ca/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 71c4c41..a69ce36 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 @@ -129,7 +129,7 @@ public abstract class GridCacheContinuousQueryAbstractSelfTest extends GridCommo GridTestUtils.waitForCondition(new PA() { @Override public boolean apply() { for (int i = 0; i < gridCount(); i++) { - if (grid(i).nodes().size() != gridCount()) + if (grid(i).cluster().nodes().size() != gridCount()) return false; } @@ -138,7 +138,7 @@ public abstract class GridCacheContinuousQueryAbstractSelfTest extends GridCommo }, 3000); for (int i = 0; i < gridCount(); i++) - assertEquals(gridCount(), grid(i).nodes().size()); + assertEquals(gridCount(), grid(i).cluster().nodes().size()); for (int i = 0; i < gridCount(); i++) { for (int j = 0; j < 5; j++) { @@ -416,7 +416,7 @@ public abstract class GridCacheContinuousQueryAbstractSelfTest extends GridCommo int key = 0; while (true) { - ClusterNode n = grid(0).mapKeyToNode(null, key); + ClusterNode n = grid(0).cluster().mapKeyToNode(null, key); assert n != null; @@ -483,14 +483,14 @@ public abstract class GridCacheContinuousQueryAbstractSelfTest extends GridCommo qry.setBufferSize(5); try (QueryCursor<Cache.Entry<Integer, Integer>> ignored = cache.query(qry)) { - ClusterNode node = F.first(grid(0).forRemotes().nodes()); + ClusterNode node = F.first(grid(0).cluster().forRemotes().nodes()); Collection<Integer> keys = new HashSet<>(); int key = 0; while (true) { - ClusterNode n = grid(0).mapKeyToNode(null, key); + ClusterNode n = grid(0).cluster().mapKeyToNode(null, key); assert n != null; @@ -569,14 +569,14 @@ public abstract class GridCacheContinuousQueryAbstractSelfTest extends GridCommo qry.setTimeInterval(3000); try (QueryCursor<Cache.Entry<Integer, Integer>> ignored = cache.query(qry)) { - ClusterNode node = F.first(grid(0).forRemotes().nodes()); + ClusterNode node = F.first(grid(0).cluster().forRemotes().nodes()); Collection<Integer> keys = new HashSet<>(); int key = 0; while (true) { - ClusterNode n = grid(0).mapKeyToNode(null, key); + ClusterNode n = grid(0).cluster().mapKeyToNode(null, key); assert n != null; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a67b72ca/modules/core/src/test/java/org/apache/ignite/internal/processors/closure/GridClosureProcessorRemoteTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/closure/GridClosureProcessorRemoteTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/closure/GridClosureProcessorRemoteTest.java index f0dff7f..961d443 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/closure/GridClosureProcessorRemoteTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/closure/GridClosureProcessorRemoteTest.java @@ -103,7 +103,7 @@ public class GridClosureProcessorRemoteTest extends GridCommonAbstractTest { compute(g.cluster().forNode(rmt)).run(new CA() { @Override public void apply() { - message(grid().forNode(loc)).localListen(new IgniteBiPredicate<UUID, String>() { + message(grid().cluster().forNode(loc)).localListen(new IgniteBiPredicate<UUID, String>() { @Override public boolean apply(UUID uuid, String s) { System.out.println("Received test message [nodeId: " + uuid + ", s=" + s + ']'); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a67b72ca/modules/core/src/test/java/org/apache/ignite/internal/processors/closure/GridClosureProcessorSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/closure/GridClosureProcessorSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/closure/GridClosureProcessorSelfTest.java index d385398..fb5f8dc 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/closure/GridClosureProcessorSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/closure/GridClosureProcessorSelfTest.java @@ -196,7 +196,7 @@ public class GridClosureProcessorSelfTest extends GridCommonAbstractTest { execCntr.set(0); - IgniteCompute comp = p != null ? compute(grid(idx).forPredicate(p)) : grid(idx).compute(); + IgniteCompute comp = p != null ? compute(grid(idx).cluster().forPredicate(p)) : grid(idx).compute(); comp = comp.withAsync(); @@ -219,7 +219,7 @@ public class GridClosureProcessorSelfTest extends GridCommonAbstractTest { execCntr.set(0); - ClusterGroup prj = grid(idx); + ClusterGroup prj = grid(idx).cluster(); if (p != null) prj = prj.forPredicate(p); @@ -246,7 +246,7 @@ public class GridClosureProcessorSelfTest extends GridCommonAbstractTest { execCntr.set(0); - IgniteCompute comp = p != null ? compute(grid(idx).forPredicate(p)) : grid(idx).compute(); + IgniteCompute comp = p != null ? compute(grid(idx).cluster().forPredicate(p)) : grid(idx).compute(); comp = comp.withAsync(); @@ -269,7 +269,7 @@ public class GridClosureProcessorSelfTest extends GridCommonAbstractTest { execCntr.set(0); - IgniteCompute comp = p != null ? compute(grid(idx).forPredicate(p)) : grid(idx).compute(); + IgniteCompute comp = p != null ? compute(grid(idx).cluster().forPredicate(p)) : grid(idx).compute(); comp = comp.withAsync(); @@ -292,7 +292,7 @@ public class GridClosureProcessorSelfTest extends GridCommonAbstractTest { execCntr.set(0); - IgniteCompute comp = p != null ? compute(grid(idx).forPredicate(p)) : grid(idx).compute(); + IgniteCompute comp = p != null ? compute(grid(idx).cluster().forPredicate(p)) : grid(idx).compute(); comp = comp.withAsync(); @@ -315,7 +315,7 @@ public class GridClosureProcessorSelfTest extends GridCommonAbstractTest { execCntr.set(0); - IgniteCompute comp = p != null ? compute(grid(idx).forPredicate(p)) : grid(idx).compute(); + IgniteCompute comp = p != null ? compute(grid(idx).cluster().forPredicate(p)) : grid(idx).compute(); comp = comp.withAsync(); @@ -408,7 +408,7 @@ public class GridClosureProcessorSelfTest extends GridCommonAbstractTest { * @throws Exception If failed. */ public void testCallAsyncErrorNoFailover() throws Exception { - IgniteCompute comp = compute(grid(0).forPredicate(F.notEqualTo(grid(0).localNode()))).withAsync(); + IgniteCompute comp = compute(grid(0).cluster().forPredicate(F.notEqualTo(grid(0).localNode()))).withAsync(); comp.withNoFailover().call(new TestCallableError()); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a67b72ca/modules/core/src/test/java/org/apache/ignite/internal/processors/continuous/GridEventConsumeSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/continuous/GridEventConsumeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/continuous/GridEventConsumeSelfTest.java index edee18a..459786c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/continuous/GridEventConsumeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/continuous/GridEventConsumeSelfTest.java @@ -98,7 +98,7 @@ public class GridEventConsumeSelfTest extends GridCommonAbstractTest { /** {@inheritDoc} */ @Override protected void afterTest() throws Exception { - assertEquals(GRID_CNT, grid(0).nodes().size()); + assertEquals(GRID_CNT, grid(0).cluster().nodes().size()); for (int i = 0; i < GRID_CNT; i++) { IgniteKernal grid = (IgniteKernal)grid(i); @@ -390,7 +390,7 @@ public class GridEventConsumeSelfTest extends GridCommonAbstractTest { final AtomicInteger cnt = new AtomicInteger(); final CountDownLatch latch = new CountDownLatch(GRID_CNT - 1); - UUID consumeId = events(grid(0).forRemotes()).remoteListen( + UUID consumeId = events(grid(0).cluster().forRemotes()).remoteListen( new P2<UUID, Event>() { @Override public boolean apply(UUID nodeId, Event evt) { info("Event from " + nodeId + " [" + evt.shortDisplay() + ']'); @@ -431,7 +431,7 @@ public class GridEventConsumeSelfTest extends GridCommonAbstractTest { final AtomicInteger cnt = new AtomicInteger(); final CountDownLatch latch = new CountDownLatch(GRID_CNT - 1); - UUID consumeId = events(grid(0).forAttribute("include", null)).remoteListen( + UUID consumeId = events(grid(0).cluster().forAttribute("include", null)).remoteListen( new P2<UUID, Event>() { @Override public boolean apply(UUID nodeId, Event evt) { info("Event from " + nodeId + " [" + evt.shortDisplay() + ']'); @@ -472,7 +472,7 @@ public class GridEventConsumeSelfTest extends GridCommonAbstractTest { final AtomicInteger cnt = new AtomicInteger(); final CountDownLatch latch = new CountDownLatch(1); - UUID consumeId = events(grid(0).forLocal()).remoteListen( + UUID consumeId = events(grid(0).cluster().forLocal()).remoteListen( new P2<UUID, Event>() { @Override public boolean apply(UUID nodeId, Event evt) { info("Event from " + nodeId + " [" + evt.shortDisplay() + ']'); @@ -512,7 +512,7 @@ public class GridEventConsumeSelfTest extends GridCommonAbstractTest { */ public void testEmptyProjection() throws Exception { try { - events(grid(0).forPredicate(F.<ClusterNode>alwaysFalse())).remoteListen( + events(grid(0).cluster().forPredicate(F.<ClusterNode>alwaysFalse())).remoteListen( new P2<UUID, Event>() { @Override public boolean apply(UUID nodeId, Event evt) { return true; @@ -642,13 +642,13 @@ public class GridEventConsumeSelfTest extends GridCommonAbstractTest { }, EVT_JOB_STARTED); - compute(grid(0).forLocal()).run(F.noop()); + compute(grid(0).cluster().forLocal()).run(F.noop()); assert latch.await(2, SECONDS); assertEquals(1, cnt.get()); - compute(grid(0).forLocal()).run(F.noop()); + compute(grid(0).cluster().forLocal()).run(F.noop()); U.sleep(500); @@ -714,7 +714,7 @@ public class GridEventConsumeSelfTest extends GridCommonAbstractTest { final AtomicInteger cnt = new AtomicInteger(); final CountDownLatch latch = new CountDownLatch(GRID_CNT); - UUID consumeId = events(grid(0).forAttribute("include", null)).remoteListen( + UUID consumeId = events(grid(0).cluster().forAttribute("include", null)).remoteListen( new P2<UUID, Event>() { @Override public boolean apply(UUID nodeId, Event evt) { info("Event from " + nodeId + " [" + evt.shortDisplay() + ']'); @@ -772,7 +772,7 @@ public class GridEventConsumeSelfTest extends GridCommonAbstractTest { IgnitePredicate<ClusterNode> prjPred = (IgnitePredicate<ClusterNode>)ldr.loadClass(PRJ_PRED_CLS_NAME).newInstance(); IgnitePredicate<Event> filter = (IgnitePredicate<Event>)ldr.loadClass(FILTER_CLS_NAME).newInstance(); - UUID consumeId = events(grid(0).forPredicate(prjPred)).remoteListen(new P2<UUID, Event>() { + UUID consumeId = events(grid(0).cluster().forPredicate(prjPred)).remoteListen(new P2<UUID, Event>() { @Override public boolean apply(UUID nodeId, Event evt) { info("Event from " + nodeId + " [" + evt.shortDisplay() + ']'); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a67b72ca/modules/core/src/test/java/org/apache/ignite/internal/processors/continuous/GridMessageListenSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/continuous/GridMessageListenSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/continuous/GridMessageListenSelfTest.java index 0797c38..bac0424 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/continuous/GridMessageListenSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/continuous/GridMessageListenSelfTest.java @@ -138,7 +138,7 @@ public class GridMessageListenSelfTest extends GridCommonAbstractTest { public void testNullTopic() throws Exception { latch = new CountDownLatch(MSG_CNT * GRID_CNT); - listen(grid(0), null, true); + listen(grid(0).cluster(), null, true); send(); @@ -157,7 +157,7 @@ public class GridMessageListenSelfTest extends GridCommonAbstractTest { public void testNonNullTopic() throws Exception { latch = new CountDownLatch(MSG_CNT * GRID_CNT); - listen(grid(0), null, true); + listen(grid(0).cluster(), null, true); send(); @@ -176,7 +176,7 @@ public class GridMessageListenSelfTest extends GridCommonAbstractTest { public void testStopListen() throws Exception { latch = new CountDownLatch(GRID_CNT); - listen(grid(0), null, false); + listen(grid(0).cluster(), null, false); send(); @@ -201,7 +201,7 @@ public class GridMessageListenSelfTest extends GridCommonAbstractTest { public void testProjection() throws Exception { latch = new CountDownLatch(MSG_CNT * (GRID_CNT - 1)); - listen(grid(0).forRemotes(), null, true); + listen(grid(0).cluster().forRemotes(), null, true); send(); @@ -220,7 +220,7 @@ public class GridMessageListenSelfTest extends GridCommonAbstractTest { public void testNodeJoin() throws Exception { latch = new CountDownLatch(MSG_CNT * (GRID_CNT + 1)); - listen(grid(0), null, true); + listen(grid(0).cluster(), null, true); try { Ignite g = startGrid("anotherGrid"); @@ -252,7 +252,7 @@ public class GridMessageListenSelfTest extends GridCommonAbstractTest { public void testNodeJoinWithProjection() throws Exception { latch = new CountDownLatch(MSG_CNT * GRID_CNT); - listen(grid(0).forAttribute(INC_ATTR, null), null, true); + listen(grid(0).cluster().forAttribute(INC_ATTR, null), null, true); try { include = true; @@ -334,7 +334,7 @@ public class GridMessageListenSelfTest extends GridCommonAbstractTest { public void testListenActor() throws Exception { latch = new CountDownLatch(MSG_CNT * (GRID_CNT + 1)); - grid(0).message().remoteListen(null, new Actor(grid(0))); + grid(0).message().remoteListen(null, new Actor(grid(0).cluster())); try { Ignite g = startGrid("anotherGrid"); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a67b72ca/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsSizeSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsSizeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsSizeSelfTest.java index 60e0739..b212f02 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsSizeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsSizeSelfTest.java @@ -693,7 +693,7 @@ public class IgfsSizeSelfTest extends IgfsCommonAbstractTest { private UUID primary(IgfsBlockKey key) { IgniteEx grid = grid(0); - for (ClusterNode node : grid.nodes()) { + for (ClusterNode node : grid.cluster().nodes()) { if (grid.cachex(DATA_CACHE_NAME).affinity().isPrimary(node, key)) return node.id(); } @@ -712,7 +712,7 @@ public class IgfsSizeSelfTest extends IgfsCommonAbstractTest { Collection<UUID> ids = new HashSet<>(); - for (ClusterNode node : grid.nodes()) { + for (ClusterNode node : grid.cluster().nodes()) { if (grid.cachex(DATA_CACHE_NAME).affinity().isPrimaryOrBackup(node, key)) ids.add(node.id()); } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a67b72ca/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsStreamsSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsStreamsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsStreamsSelfTest.java index bbd7432..054665d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsStreamsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsStreamsSelfTest.java @@ -195,7 +195,7 @@ public class IgfsStreamsSelfTest extends IgfsCommonAbstractTest { while (true) { affKey = new IgniteUuid(uuid, idx); - if (grid(0).mapKeyToNode(DATA_CACHE_NAME, affKey).id().equals(grid(0).localNode().id())) + if (grid(0).cluster().mapKeyToNode(DATA_CACHE_NAME, affKey).id().equals(grid(0).localNode().id())) break; idx++; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a67b72ca/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceReassignmentSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceReassignmentSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceReassignmentSelfTest.java index 326554b..61dbe9e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceReassignmentSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceReassignmentSelfTest.java @@ -155,7 +155,7 @@ public class GridServiceReassignmentSelfTest extends GridServiceProcessorAbstrac GridServiceAssignments assignments = cache.get(new GridServiceAssignmentsKey("testService")); - Collection<UUID> nodes = F.viewReadOnly(grid.nodes(), F.node2id()); + Collection<UUID> nodes = F.viewReadOnly(grid.cluster().nodes(), F.node2id()); assertNotNull("Grid assignments object is null", assignments); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a67b72ca/modules/core/src/test/java/org/apache/ignite/marshaller/GridMarshallerAbstractTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/marshaller/GridMarshallerAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/marshaller/GridMarshallerAbstractTest.java index b4db676..a7f4f73 100644 --- a/modules/core/src/test/java/org/apache/ignite/marshaller/GridMarshallerAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/marshaller/GridMarshallerAbstractTest.java @@ -18,18 +18,16 @@ package org.apache.ignite.marshaller; import org.apache.ignite.*; -import org.apache.ignite.cache.affinity.*; import org.apache.ignite.cluster.*; import org.apache.ignite.compute.*; import org.apache.ignite.configuration.*; import org.apache.ignite.events.*; import org.apache.ignite.internal.*; +import org.apache.ignite.internal.cluster.*; import org.apache.ignite.internal.executor.*; import org.apache.ignite.internal.processors.cache.*; -import org.apache.ignite.internal.processors.cache.affinity.*; import org.apache.ignite.internal.processors.service.*; import org.apache.ignite.internal.processors.streamer.*; -import org.apache.ignite.internal.product.*; import org.apache.ignite.internal.util.*; import org.apache.ignite.internal.util.typedef.*; import org.apache.ignite.lang.*; @@ -528,7 +526,7 @@ public abstract class GridMarshallerAbstractTest extends GridCommonAbstractTest */ @SuppressWarnings("unchecked") public void testNodeLocalMarshalling() throws Exception { - ClusterNodeLocalMap<String, String> loc = grid().nodeLocalMap(); + ClusterNodeLocalMap<String, String> loc = grid().cluster().nodeLocalMap(); String key = "test-key"; String val = "test-val"; @@ -652,7 +650,7 @@ public abstract class GridMarshallerAbstractTest extends GridCommonAbstractTest IgniteConfiguration cfg = optimize(getConfiguration("g1")); try (Ignite g1 = G.start(cfg)) { - IgniteCompute compute = compute(grid().forNode(g1.cluster().localNode())); + IgniteCompute compute = compute(grid().cluster().forNode(g1.cluster().localNode())); compute.run(new IgniteRunnable() { @Override @@ -693,7 +691,7 @@ public abstract class GridMarshallerAbstractTest extends GridCommonAbstractTest IgniteConfiguration cfg = optimize(getConfiguration("g1")); try (Ignite g1 = G.start(cfg)) { - IgniteEvents evts = events(grid().forNode(g1.cluster().localNode())); + IgniteEvents evts = events(grid().cluster().forNode(g1.cluster().localNode())); evts.localListen(new IgnitePredicate<Event>() { @Override public boolean apply(Event gridEvt) { @@ -735,7 +733,7 @@ public abstract class GridMarshallerAbstractTest extends GridCommonAbstractTest IgniteConfiguration cfg = optimize(getConfiguration("g1")); try (Ignite g1 = G.start(cfg)) { - IgniteMessaging messaging = message(grid().forNode(g1.cluster().localNode())); + IgniteMessaging messaging = message(grid().cluster().forNode(g1.cluster().localNode())); messaging.send(null, "test"); @@ -771,7 +769,7 @@ public abstract class GridMarshallerAbstractTest extends GridCommonAbstractTest IgniteConfiguration cfg = optimize(getConfiguration("g1")); try (Ignite g1 = G.start(cfg)) { - IgniteServices services = grid().services(grid().forNode(g1.cluster().localNode())); + IgniteServices services = grid().services(grid().cluster().forNode(g1.cluster().localNode())); services.deployNodeSingleton("test", new DummyService()); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a67b72ca/modules/core/src/test/java/org/apache/ignite/spi/GridTcpSpiForwardingSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/spi/GridTcpSpiForwardingSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/GridTcpSpiForwardingSelfTest.java index eda0356..744635d 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/GridTcpSpiForwardingSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/GridTcpSpiForwardingSelfTest.java @@ -149,8 +149,8 @@ public class GridTcpSpiForwardingSelfTest extends GridCommonAbstractTest { Ignite g1 = startGrid(0); Ignite g2 = startGrid(1) ) { - assertEquals(2, grid(0).nodes().size()); - assertEquals(2, grid(1).nodes().size()); + assertEquals(2, grid(0).cluster().nodes().size()); + assertEquals(2, grid(1).cluster().nodes().size()); Collection<Integer> t = g1.compute().broadcast(new IgniteCallable<Integer>() { @Override public Integer call() throws Exception { http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a67b72ca/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpiWildcardSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpiWildcardSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpiWildcardSelfTest.java index 5e6d6c4..0dcfb19 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpiWildcardSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpiWildcardSelfTest.java @@ -54,7 +54,7 @@ public class TcpDiscoverySpiWildcardSelfTest extends GridCommonAbstractTest { startGridsMultiThreaded(NODES); for (int i = 0; i < NODES; i++) - assertEquals(NODES, grid(i).nodes().size()); + assertEquals(NODES, grid(i).cluster().nodes().size()); } finally { stopAllGrids(); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a67b72ca/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java index bebf860..e6a0ebd 100644 --- a/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java @@ -581,9 +581,9 @@ public abstract class GridAbstractTest extends TestCase { boolean topOk = true; for (int i = 0; i < cnt; i++) { - if (cnt != grid(i).nodes().size()) { + if (cnt != grid(i).cluster().nodes().size()) { U.warn(log, "Grid size is incorrect (will re-run check in 1000 ms) " + - "[name=" + grid(i).name() + ", size=" + grid(i).nodes().size() + ']'); + "[name=" + grid(i).name() + ", size=" + grid(i).cluster().nodes().size() + ']'); topOk = false; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a67b72ca/modules/hadoop/src/test/java/org/apache/ignite/igfs/IgfsHadoop20FileSystemAbstractSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/hadoop/src/test/java/org/apache/ignite/igfs/IgfsHadoop20FileSystemAbstractSelfTest.java b/modules/hadoop/src/test/java/org/apache/ignite/igfs/IgfsHadoop20FileSystemAbstractSelfTest.java index cd299b4..207bc79 100644 --- a/modules/hadoop/src/test/java/org/apache/ignite/igfs/IgfsHadoop20FileSystemAbstractSelfTest.java +++ b/modules/hadoop/src/test/java/org/apache/ignite/igfs/IgfsHadoop20FileSystemAbstractSelfTest.java @@ -322,7 +322,7 @@ public abstract class IgfsHadoop20FileSystemAbstractSelfTest extends IgfsCommonA FsStatus status = fs.getFsStatus(); - assertEquals(4, grid(0).nodes().size()); + assertEquals(4, grid(0).cluster().nodes().size()); long used = 0, max = 0;