http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dc04e98c/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java index af63307..0200536 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java @@ -529,7 +529,7 @@ public class GridDhtLocalPartition<K, V> implements Comparable<GridDhtLocalParti boolean swap = cctx.isSwapOrOffheapEnabled(); - boolean rec = cctx.events().isRecordable(EVT_CACHE_PRELOAD_OBJECT_UNLOADED); + boolean rec = cctx.events().isRecordable(EVT_CACHE_REBALANCE_OBJECT_UNLOADED); for (Iterator<GridDhtCacheEntry<K, V>> it = map.values().iterator(); it.hasNext();) { GridDhtCacheEntry<K, V> cached = it.next(); @@ -543,7 +543,7 @@ public class GridDhtLocalPartition<K, V> implements Comparable<GridDhtLocalParti if (rec) cctx.events().addEvent(cached.partition(), cached.key(), cctx.localNodeId(), (IgniteUuid)null, - null, EVT_CACHE_PRELOAD_OBJECT_UNLOADED, null, false, cached.rawGet(), + null, EVT_CACHE_REBALANCE_OBJECT_UNLOADED, null, false, cached.rawGet(), cached.hasValue(), null, null, null); } }
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dc04e98c/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockFuture.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockFuture.java index dba5ed2..acf33e5 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockFuture.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockFuture.java @@ -1070,7 +1070,7 @@ public final class GridDhtLockFuture<K, V> extends GridCompoundIdentityFuture<Bo boolean replicate = cctx.isDrEnabled(); - boolean rec = cctx.events().isRecordable(EVT_CACHE_PRELOAD_OBJECT_LOADED); + boolean rec = cctx.events().isRecordable(EVT_CACHE_REBALANCE_OBJECT_LOADED); for (GridCacheEntryInfo<K, V> info : res.preloadEntries()) { try { @@ -1080,7 +1080,7 @@ public final class GridDhtLockFuture<K, V> extends GridCompoundIdentityFuture<Bo info.expireTime(), true, topVer, replicate ? DR_PRELOAD : DR_NONE)) { if (rec && !entry.isInternal()) cctx.events().addEvent(entry.partition(), entry.key(), cctx.localNodeId(), - (IgniteUuid)null, null, EVT_CACHE_PRELOAD_OBJECT_LOADED, info.value(), true, null, + (IgniteUuid)null, null, EVT_CACHE_REBALANCE_OBJECT_LOADED, info.value(), true, null, false, null, null, null); } } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dc04e98c/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionTopologyImpl.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionTopologyImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionTopologyImpl.java index acf00eb..6978678 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionTopologyImpl.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionTopologyImpl.java @@ -244,7 +244,7 @@ class GridDhtPartitionTopologyImpl<K, V> implements GridDhtPartitionTopology<K, } } - if (cctx.preloadEnabled()) { + if (cctx.rebalanceEnabled()) { for (int p = 0; p < num; p++) { // If this is the first node in grid. if (oldest.id().equals(loc.id()) && oldest.id().equals(exchId.nodeId())) { @@ -322,7 +322,7 @@ class GridDhtPartitionTopologyImpl<K, V> implements GridDhtPartitionTopology<K, updateLocal(p, loc.id(), locPart.state(), updateSeq); if (log.isDebugEnabled()) - log.debug("Evicting partition with preloading disabled " + + log.debug("Evicting partition with rebalancing disabled " + "(it does not belong to affinity): " + locPart); } } @@ -334,7 +334,7 @@ class GridDhtPartitionTopologyImpl<K, V> implements GridDhtPartitionTopology<K, } catch (GridDhtInvalidPartitionException e) { if (log.isDebugEnabled()) - log.debug("Ignoring invalid partition with disabled preloader (no need to " + + log.debug("Ignoring invalid partition with disabled rebalancer (no need to " + "pre-create a partition if it no longer belongs to local node: " + e.partition()); } } @@ -396,7 +396,7 @@ class GridDhtPartitionTopologyImpl<K, V> implements GridDhtPartitionTopology<K, GridDhtPartitionState state = locPart.state(); if (state == MOVING) { - if (cctx.preloadEnabled()) { + if (cctx.rebalanceEnabled()) { Collection<ClusterNode> owners = owners(p); // If there are no other owners, then become an owner. @@ -414,7 +414,7 @@ class GridDhtPartitionTopologyImpl<K, V> implements GridDhtPartitionTopology<K, log.debug("Owned partition: " + locPart); } else if (log.isDebugEnabled()) - log.debug("Will not own partition (there are owners to preload from) [locPart=" + + log.debug("Will not own partition (there are owners to rebalance from) [locPart=" + locPart + ", owners = " + owners + ']'); } else @@ -659,7 +659,7 @@ class GridDhtPartitionTopologyImpl<K, V> implements GridDhtPartitionTopology<K, /** {@inheritDoc} */ @Override public List<ClusterNode> owners(int p, long topVer) { - if (!cctx.preloadEnabled()) + if (!cctx.rebalanceEnabled()) return ownersAndMoving(p, topVer); return nodes(p, topVer, OWNING); @@ -672,7 +672,7 @@ class GridDhtPartitionTopologyImpl<K, V> implements GridDhtPartitionTopology<K, /** {@inheritDoc} */ @Override public List<ClusterNode> moving(int p) { - if (!cctx.preloadEnabled()) + if (!cctx.rebalanceEnabled()) return ownersAndMoving(p, -1); return nodes(p, -1, MOVING); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dc04e98c/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareFuture.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareFuture.java index e3cdc6e..918cf4d 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareFuture.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareFuture.java @@ -1249,7 +1249,7 @@ public final class GridDhtTxPrepareFuture<K, V> extends GridCompoundIdentityFutu long topVer = tx.topologyVersion(); - boolean rec = cctx.gridEvents().isRecordable(EVT_CACHE_PRELOAD_OBJECT_LOADED); + boolean rec = cctx.gridEvents().isRecordable(EVT_CACHE_REBALANCE_OBJECT_LOADED); for (GridCacheEntryInfo<K, V> info : res.preloadEntries()) { GridCacheContext<K, V> cacheCtx = cctx.cacheContext(info.cacheId()); @@ -1264,7 +1264,7 @@ public final class GridDhtTxPrepareFuture<K, V> extends GridCompoundIdentityFutu info.ttl(), info.expireTime(), true, topVer, drType)) { if (rec && !entry.isInternal()) cacheCtx.events().addEvent(entry.partition(), entry.key(), cctx.localNodeId(), - (IgniteUuid)null, null, EVT_CACHE_PRELOAD_OBJECT_LOADED, info.value(), true, null, + (IgniteUuid)null, null, EVT_CACHE_REBALANCE_OBJECT_LOADED, info.value(), true, null, false, null, null, null); } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dc04e98c/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtForceKeysFuture.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtForceKeysFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtForceKeysFuture.java index 170a0c0..9f627f6 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtForceKeysFuture.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtForceKeysFuture.java @@ -292,10 +292,10 @@ public final class GridDhtForceKeysFuture<K, V> extends GridCompoundFuture<Objec try { if (e != null && !e.isNewLocked()) { if (log.isDebugEnabled()) - log.debug("Will not preload key (entry is not new) [cacheName=" + cctx.name() + + log.debug("Will not rebalance key (entry is not new) [cacheName=" + cctx.name() + ", key=" + key + ", part=" + part + ", locId=" + cctx.nodeId() + ']'); - // Key has been preloaded or retrieved already. + // Key has been rebalanced or retrieved already. return; } } @@ -308,12 +308,12 @@ public final class GridDhtForceKeysFuture<K, V> extends GridCompoundFuture<Objec List<ClusterNode> owners = F.isEmpty(exc) ? top.owners(part, topVer) : new ArrayList<>(F.view(top.owners(part, topVer), F.notIn(exc))); - if (owners.isEmpty() || (owners.contains(loc) && cctx.preloadEnabled())) { + if (owners.isEmpty() || (owners.contains(loc) && cctx.rebalanceEnabled())) { if (log.isDebugEnabled()) - log.debug("Will not preload key (local node is owner) [key=" + key + ", part=" + part + + log.debug("Will not rebalance key (local node is owner) [key=" + key + ", part=" + part + "topVer=" + topVer + ", locId=" + cctx.nodeId() + ']'); - // Key is already preloaded. + // Key is already rebalanced. return; } @@ -326,7 +326,7 @@ public final class GridDhtForceKeysFuture<K, V> extends GridCompoundFuture<Objec if (locPart == null) invalidParts.add(part); - // If preloader is disabled, then local partition is always MOVING. + // If rebalance is disabled, then local partition is always MOVING. else if (locPart.state() == MOVING) { Collections.sort(owners, CU.nodeComparator(false)); @@ -335,12 +335,12 @@ public final class GridDhtForceKeysFuture<K, V> extends GridCompoundFuture<Objec assert pick != null; - if (!cctx.preloadEnabled() && loc.id().equals(pick.id())) + if (!cctx.rebalanceEnabled() && loc.id().equals(pick.id())) pick = F.first(F.view(owners, F.remoteNodes(loc.id()))); if (pick == null) { if (log.isDebugEnabled()) - log.debug("Will not preload key (no nodes to request from with preloading disabled) [key=" + + log.debug("Will not rebalance key (no nodes to request from with rebalancing disabled) [key=" + key + ", part=" + part + ", locId=" + cctx.nodeId() + ']'); return; @@ -353,14 +353,14 @@ public final class GridDhtForceKeysFuture<K, V> extends GridCompoundFuture<Objec mappedKeys.add(key); if (log.isDebugEnabled()) - log.debug("Will preload key from node [cacheName=" + cctx.namex() + ", key=" + key + ", part=" + + log.debug("Will rebalance key from node [cacheName=" + cctx.namex() + ", key=" + key + ", part=" + part + ", node=" + pick.id() + ", locId=" + cctx.nodeId() + ']'); } else if (locPart.state() != OWNING) invalidParts.add(part); else { if (log.isDebugEnabled()) - log.debug("Will not preload key (local partition is not MOVING) [cacheName=" + cctx.name() + + log.debug("Will not rebalance key (local partition is not MOVING) [cacheName=" + cctx.name() + ", key=" + key + ", part=" + locPart + ", locId=" + cctx.nodeId() + ']'); } } @@ -477,8 +477,8 @@ public final class GridDhtForceKeysFuture<K, V> extends GridCompoundFuture<Objec remapMissed = true; } - // If preloading is disabled, we need to check other backups. - if (!cctx.preloadEnabled()) { + // If rebalancing is disabled, we need to check other backups. + if (!cctx.rebalanceEnabled()) { Collection<K> retryKeys = F.view( keys, F0.notIn(missedKeys), @@ -488,7 +488,7 @@ public final class GridDhtForceKeysFuture<K, V> extends GridCompoundFuture<Objec map(retryKeys, F.concat(false, node, exc)); } - boolean rec = cctx.events().isRecordable(EVT_CACHE_PRELOAD_OBJECT_LOADED); + boolean rec = cctx.events().isRecordable(EVT_CACHE_REBALANCE_OBJECT_LOADED); boolean replicate = cctx.isDrEnabled(); @@ -513,7 +513,7 @@ public final class GridDhtForceKeysFuture<K, V> extends GridCompoundFuture<Objec )) { if (rec && !entry.isInternal()) cctx.events().addEvent(entry.partition(), entry.key(), cctx.localNodeId(), - (IgniteUuid)null, null, EVT_CACHE_PRELOAD_OBJECT_LOADED, info.value(), true, null, + (IgniteUuid)null, null, EVT_CACHE_REBALANCE_OBJECT_LOADED, info.value(), true, null, false, null, null, null); } } @@ -524,7 +524,7 @@ public final class GridDhtForceKeysFuture<K, V> extends GridCompoundFuture<Objec } catch (GridCacheEntryRemovedException ignore) { if (log.isDebugEnabled()) - log.debug("Trying to preload removed entry (will ignore) [cacheName=" + + log.debug("Trying to rebalance removed entry (will ignore) [cacheName=" + cctx.namex() + ", entry=" + entry + ']'); } finally { http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dc04e98c/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemandPool.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemandPool.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemandPool.java index 6a1f7a1..e937757 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemandPool.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemandPool.java @@ -72,7 +72,7 @@ public class GridDhtPartitionDemandPool<K, V> { /** Preload predicate. */ private IgnitePredicate<GridCacheEntryInfo<K, V>> preloadPred; - /** Future for preload mode {@link org.apache.ignite.cache.CachePreloadMode#SYNC}. */ + /** Future for preload mode {@link org.apache.ignite.cache.CacheRebalanceMode#SYNC}. */ @GridToStringInclude private SyncFuture syncFut; @@ -107,7 +107,7 @@ public class GridDhtPartitionDemandPool<K, V> { log = cctx.logger(getClass()); - poolSize = cctx.preloadEnabled() ? cctx.config().getPreloadThreadPoolSize() : 0; + poolSize = cctx.rebalanceEnabled() ? cctx.config().getRebalanceThreadPoolSize() : 0; if (poolSize > 0) { barrier = new CyclicBarrier(poolSize); @@ -128,7 +128,7 @@ public class GridDhtPartitionDemandPool<K, V> { syncFut.onDone(); } - timeout = new AtomicLong(cctx.config().getPreloadTimeout()); + timeout = new AtomicLong(cctx.config().getRebalanceTimeout()); } /** @@ -161,7 +161,7 @@ public class GridDhtPartitionDemandPool<K, V> { } /** - * @return Future for {@link org.apache.ignite.cache.CachePreloadMode#SYNC} mode. + * @return Future for {@link org.apache.ignite.cache.CacheRebalanceMode#SYNC} mode. */ IgniteInternalFuture<?> syncFuture() { return syncFut; @@ -206,7 +206,7 @@ public class GridDhtPartitionDemandPool<K, V> { if (exchFut != null) { if (log.isDebugEnabled()) - log.debug("Forcing preload event for future: " + exchFut); + log.debug("Forcing rebalance event for future: " + exchFut); exchFut.listenAsync(new CI1<IgniteInternalFuture<Long>>() { @Override public void apply(IgniteInternalFuture<Long> t) { @@ -215,7 +215,7 @@ public class GridDhtPartitionDemandPool<K, V> { }); } else if (log.isDebugEnabled()) - log.debug("Ignoring force preload request (no topology event happened yet)."); + log.debug("Ignoring force rebalance request (no topology event happened yet)."); } /** @@ -330,7 +330,7 @@ public class GridDhtPartitionDemandPool<K, V> { if (log.isDebugEnabled()) log.debug("Adding partition assignments: " + assigns); - long delay = cctx.config().getPreloadPartitionedDelay(); + long delay = cctx.config().getRebalancePartitionedDelay(); if (delay == 0 || force) { assert assigns != null; @@ -353,7 +353,7 @@ public class GridDhtPartitionDemandPool<K, V> { final GridDhtPartitionsExchangeFuture<K, V> exchFut = lastExchangeFut; - assert exchFut != null : "Delaying preload process without topology event."; + assert exchFut != null : "Delaying rebalance process without topology event."; obj = new GridTimeoutObjectAdapter(delay) { @Override public void onTimeout() { @@ -469,7 +469,7 @@ public class GridDhtPartitionDemandPool<K, V> { // Grow by 50% only if another thread didn't do it already. if (GridDhtPartitionDemandPool.this.timeout.compareAndSet(timeout, newTimeout)) - U.warn(log, "Increased preloading message timeout from " + timeout + "ms to " + + U.warn(log, "Increased rebalancing message timeout from " + timeout + "ms to " + newTimeout + "ms."); } @@ -490,12 +490,12 @@ public class GridDhtPartitionDemandPool<K, V> { cached = cctx.dht().entryEx(entry.key()); if (log.isDebugEnabled()) - log.debug("Preloading key [key=" + entry.key() + ", part=" + p + ", node=" + pick.id() + ']'); + log.debug("Rebalancing key [key=" + entry.key() + ", part=" + p + ", node=" + pick.id() + ']'); if (cctx.dht().isIgfsDataCache() && cctx.dht().igfsDataSpaceUsed() > cctx.dht().igfsDataSpaceMax()) { - LT.error(log, null, "Failed to preload IGFS data cache (IGFS space size exceeded maximum " + - "value, will ignore preload entries): " + name()); + LT.error(log, null, "Failed to rebalance IGFS data cache (IGFS space size exceeded maximum " + + "value, will ignore rebalance entries): " + name()); if (cached.markObsoleteIfEmpty(null)) cached.context().cache().removeIfObsolete(cached.key()); @@ -516,26 +516,26 @@ public class GridDhtPartitionDemandPool<K, V> { )) { cctx.evicts().touch(cached, topVer); // Start tracking. - if (cctx.events().isRecordable(EVT_CACHE_PRELOAD_OBJECT_LOADED) && !cached.isInternal()) + if (cctx.events().isRecordable(EVT_CACHE_REBALANCE_OBJECT_LOADED) && !cached.isInternal()) cctx.events().addEvent(cached.partition(), cached.key(), cctx.localNodeId(), - (IgniteUuid)null, null, EVT_CACHE_PRELOAD_OBJECT_LOADED, entry.value(), true, null, + (IgniteUuid)null, null, EVT_CACHE_REBALANCE_OBJECT_LOADED, entry.value(), true, null, false, null, null, null); } else if (log.isDebugEnabled()) - log.debug("Preloading entry is already in cache (will ignore) [key=" + cached.key() + + log.debug("Rebalancing entry is already in cache (will ignore) [key=" + cached.key() + ", part=" + p + ']'); } else if (log.isDebugEnabled()) - log.debug("Preload predicate evaluated to false for entry (will ignore): " + entry); + log.debug("Rebalance predicate evaluated to false for entry (will ignore): " + entry); } catch (GridCacheEntryRemovedException ignored) { if (log.isDebugEnabled()) - log.debug("Entry has been concurrently removed while preloading (will ignore) [key=" + + log.debug("Entry has been concurrently removed while rebalancing (will ignore) [key=" + cached.key() + ", part=" + p + ']'); } catch (GridDhtInvalidPartitionException ignored) { if (log.isDebugEnabled()) - log.debug("Partition became invalid during preloading (will ignore): " + p); + log.debug("Partition became invalid during rebalancing (will ignore): " + p); return false; } @@ -544,7 +544,7 @@ public class GridDhtPartitionDemandPool<K, V> { throw e; } catch (IgniteCheckedException e) { - throw new IgniteCheckedException("Failed to cache preloaded entry (will stop preloading) [local=" + + throw new IgniteCheckedException("Failed to cache rebalanced entry (will stop rebalancing) [local=" + cctx.nodeId() + ", node=" + pick.id() + ", key=" + entry.key() + ", part=" + p + ']', e); } @@ -625,7 +625,7 @@ public class GridDhtPartitionDemandPool<K, V> { if (s == null) { if (msgQ.isEmpty()) { // Safety check. U.warn(log, "Timed out waiting for partitions to load, will retry in " + timeout + - " ms (you may need to increase 'networkTimeout' or 'preloadBatchSize'" + + " ms (you may need to increase 'networkTimeout' or 'rebalanceBatchSize'" + " configuration properties)."); growTimeout(timeout); @@ -741,10 +741,10 @@ public class GridDhtPartitionDemandPool<K, V> { top.own(part); if (log.isDebugEnabled()) - log.debug("Finished preloading partition: " + part); + log.debug("Finished rebalancing partition: " + part); - if (cctx.events().isRecordable(EVT_CACHE_PRELOAD_PART_LOADED)) - preloadEvent(p, EVT_CACHE_PRELOAD_PART_LOADED, + if (cctx.events().isRecordable(EVT_CACHE_REBALANCE_PART_LOADED)) + preloadEvent(p, EVT_CACHE_REBALANCE_PART_LOADED, exchFut.discoveryEvent()); } } @@ -757,14 +757,14 @@ public class GridDhtPartitionDemandPool<K, V> { remaining.remove(p); if (log.isDebugEnabled()) - log.debug("Skipping loading partition (state is not MOVING): " + part); + log.debug("Skipping rebalancing partition (state is not MOVING): " + part); } } else { remaining.remove(p); if (log.isDebugEnabled()) - log.debug("Skipping loading partition (it does not belong on current node): " + p); + log.debug("Skipping rebalancing partition (it does not belong on current node): " + p); } } @@ -809,29 +809,29 @@ public class GridDhtPartitionDemandPool<K, V> { /** {@inheritDoc} */ @Override protected void body() throws InterruptedException, IgniteInterruptedCheckedException { try { - int preloadOrder = cctx.config().getPreloadOrder(); + int rebalanceOrder = cctx.config().getRebalanceOrder(); - if (preloadOrder > 0) { - IgniteInternalFuture<?> fut = cctx.kernalContext().cache().orderedPreloadFuture(preloadOrder); + if (rebalanceOrder > 0) { + IgniteInternalFuture<?> fut = cctx.kernalContext().cache().orderedPreloadFuture(rebalanceOrder); try { if (fut != null) { if (log.isDebugEnabled()) - log.debug("Waiting for dependant caches preload [cacheName=" + cctx.name() + - ", preloadOrder=" + preloadOrder + ']'); + log.debug("Waiting for dependant caches rebalance [cacheName=" + cctx.name() + + ", rebalanceOrder=" + rebalanceOrder + ']'); fut.get(); } } catch (IgniteInterruptedCheckedException ignored) { if (log.isDebugEnabled()) - log.debug("Failed to wait for ordered preload future (grid is stopping): " + - "[cacheName=" + cctx.name() + ", preloadOrder=" + preloadOrder + ']'); + log.debug("Failed to wait for ordered rebalance future (grid is stopping): " + + "[cacheName=" + cctx.name() + ", rebalanceOrder=" + rebalanceOrder + ']'); return; } catch (IgniteCheckedException e) { - throw new Error("Ordered preload future should never fail: " + e.getMessage(), e); + throw new Error("Ordered rebalance future should never fail: " + e.getMessage(), e); } } @@ -844,10 +844,10 @@ public class GridDhtPartitionDemandPool<K, V> { barrier.await(); if (id == 0 && exchFut != null && !exchFut.dummy() && - cctx.events().isRecordable(EVT_CACHE_PRELOAD_STOPPED)) { + cctx.events().isRecordable(EVT_CACHE_REBALANCE_STOPPED)) { if (!cctx.isReplicated() || !stopEvtFired) { - preloadEvent(EVT_CACHE_PRELOAD_STOPPED, exchFut.discoveryEvent()); + preloadEvent(EVT_CACHE_REBALANCE_STOPPED, exchFut.discoveryEvent()); stopEvtFired = true; } @@ -908,7 +908,7 @@ public class GridDhtPartitionDemandPool<K, V> { } catch (ClusterTopologyCheckedException e) { if (log.isDebugEnabled()) - log.debug("Node left during preloading (will retry) [node=" + node.id() + + log.debug("Node left during rebalancing (will retry) [node=" + node.id() + ", msg=" + e.getMessage() + ']'); resync = true; @@ -916,7 +916,7 @@ public class GridDhtPartitionDemandPool<K, V> { break; // For. } catch (IgniteCheckedException e) { - U.error(log, "Failed to receive partitions from node (preloading will not " + + U.error(log, "Failed to receive partitions from node (rebalancing will not " + "fully finish) [node=" + node.id() + ", msg=" + d + ']', e); } } @@ -972,7 +972,7 @@ public class GridDhtPartitionDemandPool<K, V> { // No assignments for disabled preloader. GridDhtPartitionTopology<K, V> top = cctx.dht().topology(); - if (!cctx.preloadEnabled()) + if (!cctx.rebalanceEnabled()) return new GridDhtPreloaderAssignments<>(exchFut, top.topologyVersion()); int partCnt = cctx.affinity().partitions(); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dc04e98c/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionSupplyPool.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionSupplyPool.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionSupplyPool.java index 96292c4..139e73e 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionSupplyPool.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionSupplyPool.java @@ -83,7 +83,7 @@ class GridDhtPartitionSupplyPool<K, V> { top = cctx.dht().topology(); - int poolSize = cctx.preloadEnabled() ? cctx.config().getPreloadThreadPoolSize() : 0; + int poolSize = cctx.rebalanceEnabled() ? cctx.config().getRebalanceThreadPoolSize() : 0; for (int i = 0; i < poolSize; i++) workers.add(new SupplyWorker()); @@ -128,7 +128,7 @@ class GridDhtPartitionSupplyPool<K, V> { * @return Size of this thread pool. */ int poolSize() { - return cctx.config().getPreloadThreadPoolSize(); + return cctx.config().getRebalanceThreadPoolSize(); } /** @@ -153,14 +153,14 @@ class GridDhtPartitionSupplyPool<K, V> { return; try { - if (cctx.preloadEnabled()) { + if (cctx.rebalanceEnabled()) { if (log.isDebugEnabled()) log.debug("Received partition demand [node=" + nodeId + ", demand=" + d + ']'); queue.offer(new DemandMessage<>(nodeId, d)); } else - U.warn(log, "Received partition demand message when preloading is disabled (will ignore): " + d); + U.warn(log, "Received partition demand message when rebalancing is disabled (will ignore): " + d); } finally { leaveBusy(); @@ -243,7 +243,7 @@ class GridDhtPartitionSupplyPool<K, V> { GridDhtPartitionSupplyMessage<K, V> s = new GridDhtPartitionSupplyMessage<>(d.workerId(), d.updateSequence(), cctx.cacheId()); - long preloadThrottle = cctx.config().getPreloadThrottle(); + long preloadThrottle = cctx.config().getRebalanceThrottle(); boolean ack = false; @@ -296,7 +296,7 @@ class GridDhtPartitionSupplyPool<K, V> { break; } - if (s.messageSize() >= cctx.config().getPreloadBatchSize()) { + if (s.messageSize() >= cctx.config().getRebalanceBatchSize()) { ack = true; if (!reply(node, d, s)) @@ -316,7 +316,7 @@ class GridDhtPartitionSupplyPool<K, V> { if (preloadPred == null || preloadPred.apply(info)) s.addEntry(part, info, cctx.shared()); else if (log.isDebugEnabled()) - log.debug("Preload predicate evaluated to false (will not sender cache entry): " + + log.debug("Rebalance predicate evaluated to false (will not sender cache entry): " + info); } } @@ -348,7 +348,7 @@ class GridDhtPartitionSupplyPool<K, V> { break; // For. } - if (s.messageSize() >= cctx.config().getPreloadBatchSize()) { + if (s.messageSize() >= cctx.config().getRebalanceBatchSize()) { ack = true; if (!reply(node, d, s)) @@ -384,7 +384,7 @@ class GridDhtPartitionSupplyPool<K, V> { s.addEntry0(part, info, cctx.shared()); else { if (log.isDebugEnabled()) - log.debug("Preload predicate evaluated to false (will not send " + + log.debug("Rebalance predicate evaluated to false (will not send " + "cache entry): " + info); continue; @@ -443,7 +443,7 @@ class GridDhtPartitionSupplyPool<K, V> { break; } - if (s.messageSize() >= cctx.config().getPreloadBatchSize()) { + if (s.messageSize() >= cctx.config().getRebalanceBatchSize()) { ack = true; if (!reply(node, d, s)) @@ -456,7 +456,7 @@ class GridDhtPartitionSupplyPool<K, V> { if (preloadPred == null || preloadPred.apply(info)) s.addEntry(part, info, cctx.shared()); else if (log.isDebugEnabled()) - log.debug("Preload predicate evaluated to false (will not sender cache entry): " + + log.debug("Rebalance predicate evaluated to false (will not sender cache entry): " + info); } } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dc04e98c/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPreloader.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPreloader.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPreloader.java index 0821431..4d79c09 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPreloader.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPreloader.java @@ -126,7 +126,7 @@ public class GridDhtPreloader<K, V> extends GridCachePreloaderAdapter<K, V> { /** {@inheritDoc} */ @Override public void start() { if (log.isDebugEnabled()) - log.debug("Starting DHT preloader..."); + log.debug("Starting DHT rebalancer..."); cctx.io().addHandler(cctx.cacheId(), GridDhtForceKeysRequest.class, new MessageHandler<GridDhtForceKeysRequest<K, V>>() { @@ -165,7 +165,7 @@ public class GridDhtPreloader<K, V> extends GridCachePreloaderAdapter<K, V> { /** {@inheritDoc} */ @Override public void onKernalStart() throws IgniteCheckedException { if (log.isDebugEnabled()) - log.debug("DHT preloader onKernalStart callback."); + log.debug("DHT rebalancer onKernalStart callback."); ClusterNode loc = cctx.localNode(); @@ -202,7 +202,7 @@ public class GridDhtPreloader<K, V> extends GridCachePreloaderAdapter<K, V> { @SuppressWarnings( {"LockAcquiredButNotSafelyReleased"}) @Override public void onKernalStop() { if (log.isDebugEnabled()) - log.debug("DHT preloader onKernalStop callback."); + log.debug("DHT rebalancer onKernalStop callback."); cctx.events().removeListener(discoLsnr); @@ -225,12 +225,12 @@ public class GridDhtPreloader<K, V> extends GridCachePreloaderAdapter<K, V> { final long start = U.currentTimeMillis(); - if (cctx.config().getPreloadPartitionedDelay() >= 0) { - U.log(log, "Starting preloading in " + cctx.config().getPreloadMode() + " mode: " + cctx.name()); + if (cctx.config().getRebalancePartitionedDelay() >= 0) { + U.log(log, "Starting rebalancing in " + cctx.config().getRebalanceMode() + " mode: " + cctx.name()); demandPool.syncFuture().listenAsync(new CI1<Object>() { @Override public void apply(Object t) { - U.log(log, "Completed preloading in " + cctx.config().getPreloadMode() + " mode " + + U.log(log, "Completed rebalancing in " + cctx.config().getRebalanceMode() + " mode " + "[cache=" + cctx.name() + ", time=" + (U.currentTimeMillis() - start) + " ms]"); } }); @@ -472,7 +472,7 @@ public class GridDhtPreloader<K, V> extends GridCachePreloaderAdapter<K, V> { try { top.onEvicted(part, updateSeq); - if (cctx.events().isRecordable(EVT_CACHE_PRELOAD_PART_UNLOADED)) + if (cctx.events().isRecordable(EVT_CACHE_REBALANCE_PART_UNLOADED)) cctx.events().addUnloadEvent(part.id()); if (updateSeq) http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dc04e98c/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCachePreloadConfiguration.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCachePreloadConfiguration.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCachePreloadConfiguration.java index f331789..b04223d 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCachePreloadConfiguration.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCachePreloadConfiguration.java @@ -31,7 +31,7 @@ public class VisorCachePreloadConfiguration implements Serializable { private static final long serialVersionUID = 0L; /** Cache preload mode. */ - private CachePreloadMode mode; + private CacheRebalanceMode mode; /** Preload thread pool size. */ private int threadPoolSize; @@ -55,12 +55,12 @@ public class VisorCachePreloadConfiguration implements Serializable { public static VisorCachePreloadConfiguration from(CacheConfiguration ccfg) { VisorCachePreloadConfiguration cfg = new VisorCachePreloadConfiguration(); - cfg.mode = ccfg.getPreloadMode(); - cfg.batchSize = ccfg.getPreloadBatchSize(); - cfg.threadPoolSize = ccfg.getPreloadThreadPoolSize(); - cfg.partitionedDelay = ccfg.getPreloadPartitionedDelay(); - cfg.throttle = ccfg.getPreloadThrottle(); - cfg.timeout = ccfg.getPreloadTimeout(); + cfg.mode = ccfg.getRebalanceMode(); + cfg.batchSize = ccfg.getRebalanceBatchSize(); + cfg.threadPoolSize = ccfg.getRebalanceThreadPoolSize(); + cfg.partitionedDelay = ccfg.getRebalancePartitionedDelay(); + cfg.throttle = ccfg.getRebalanceThrottle(); + cfg.timeout = ccfg.getRebalanceTimeout(); return cfg; } @@ -68,7 +68,7 @@ public class VisorCachePreloadConfiguration implements Serializable { /** * @return Cache preload mode. */ - public CachePreloadMode mode() { + public CacheRebalanceMode mode() { return mode; } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dc04e98c/modules/core/src/test/config/discovery-stress.xml ---------------------------------------------------------------------- diff --git a/modules/core/src/test/config/discovery-stress.xml b/modules/core/src/test/config/discovery-stress.xml index 53e7092..96a0e54 100644 --- a/modules/core/src/test/config/discovery-stress.xml +++ b/modules/core/src/test/config/discovery-stress.xml @@ -29,7 +29,7 @@ <bean class="org.apache.ignite.configuration.CacheConfiguration"> <property name="cacheMode" value="PARTITIONED"/> <property name="distributionMode" value="PARTITIONED_ONLY"/> - <property name="preloadMode" value="SYNC"/> + <property name="rebalanceMode" value="SYNC"/> <property name="swapEnabled" value="false"/> <property name="queryIndexEnabled" value="false"/> <property name="writeSynchronizationMode" value="FULL_ASYNC"/> http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dc04e98c/modules/core/src/test/config/example-cache.xml ---------------------------------------------------------------------- diff --git a/modules/core/src/test/config/example-cache.xml b/modules/core/src/test/config/example-cache.xml index 1a02fbc..6db2de3 100644 --- a/modules/core/src/test/config/example-cache.xml +++ b/modules/core/src/test/config/example-cache.xml @@ -130,8 +130,8 @@ <!-- Initial cache size. --> <property name="startSize" value="3000000"/> - <!-- Set synchronous preloading (default is asynchronous). --> - <property name="preloadMode" value="SYNC"/> + <!-- Set synchronous rebalancing (default is asynchronous). --> + <property name="rebalanceMode" value="SYNC"/> <!-- Set to FULL_SYNC for examples, default is PRIMARY_SYNC. --> <property name="writeSynchronizationMode" value="FULL_SYNC"/> http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dc04e98c/modules/core/src/test/config/load/dsi-49-server-production.xml ---------------------------------------------------------------------- diff --git a/modules/core/src/test/config/load/dsi-49-server-production.xml b/modules/core/src/test/config/load/dsi-49-server-production.xml index 07fc164..201509a 100644 --- a/modules/core/src/test/config/load/dsi-49-server-production.xml +++ b/modules/core/src/test/config/load/dsi-49-server-production.xml @@ -42,7 +42,7 @@ <property name="name" value="PARTITIONED_CACHE"/> <property name="cacheMode" value="PARTITIONED"/> <property name="startSize" value="500000"/> - <property name="preloadMode" value="SYNC"/> + <property name="rebalanceMode" value="SYNC"/> <property name="writeSynchronizationMode" value="FULL_SYNC"/> <property name="evictionPolicy"> <bean @@ -72,7 +72,7 @@ <property name="name" value="REPLICATED_CACHE"/> <property name="cacheMode" value="REPLICATED"/> <property name="startSize" value="200"/> - <property name="preloadMode" value="NONE"/> + <property name="rebalanceMode" value="NONE"/> <property name="writeSynchronizationMode" value="FULL_SYNC"/> <property name="swapEnabled" value="false"/> <property name="indexFixedTyping" value="false"/> http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dc04e98c/modules/core/src/test/config/load/dsi-load-client.xml ---------------------------------------------------------------------- diff --git a/modules/core/src/test/config/load/dsi-load-client.xml b/modules/core/src/test/config/load/dsi-load-client.xml index 59f85be..1112a17 100644 --- a/modules/core/src/test/config/load/dsi-load-client.xml +++ b/modules/core/src/test/config/load/dsi-load-client.xml @@ -43,7 +43,7 @@ <property name="cacheMode" value="REPLICATED"/> <property name="atomicityMode" value="TRANSACTIONAL"/> <property name="startSize" value="200"/> - <property name="preloadMode" value="NONE"/> + <property name="rebalanceMode" value="NONE"/> <property name="writeSynchronizationMode" value="FULL_SYNC"/> <property name="swapEnabled" value="false"/> </bean> @@ -52,7 +52,7 @@ <property name="cacheMode" value="PARTITIONED"/> <property name="atomicityMode" value="TRANSACTIONAL"/> <property name="startSize" value="200"/> - <property name="preloadMode" value="SYNC"/> + <property name="rebalanceMode" value="SYNC"/> <property name="writeSynchronizationMode" value="FULL_SYNC"/> <property name="swapEnabled" value="false"/> <property name="atomicSequenceReserveSize" value="100000"/> http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dc04e98c/modules/core/src/test/config/load/dsi-load-server.xml ---------------------------------------------------------------------- diff --git a/modules/core/src/test/config/load/dsi-load-server.xml b/modules/core/src/test/config/load/dsi-load-server.xml index a6439e7..f66eb24 100644 --- a/modules/core/src/test/config/load/dsi-load-server.xml +++ b/modules/core/src/test/config/load/dsi-load-server.xml @@ -42,7 +42,7 @@ <property name="cacheMode" value="REPLICATED"/> <property name="atomicityMode" value="TRANSACTIONAL"/> <property name="startSize" value="200"/> - <property name="preloadMode" value="NONE"/> + <property name="rebalanceMode" value="NONE"/> <property name="writeSynchronizationMode" value="FULL_SYNC"/> <property name="swapEnabled" value="false"/> </bean> @@ -51,7 +51,7 @@ <property name="cacheMode" value="PARTITIONED"/> <property name="atomicityMode" value="TRANSACTIONAL"/> <property name="startSize" value="200"/> - <property name="preloadMode" value="SYNC"/> + <property name="rebalanceMode" value="SYNC"/> <property name="writeSynchronizationMode" value="FULL_SYNC"/> <!--Eviction settings--> http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dc04e98c/modules/core/src/test/config/spring-cache-load.xml ---------------------------------------------------------------------- diff --git a/modules/core/src/test/config/spring-cache-load.xml b/modules/core/src/test/config/spring-cache-load.xml index 6067317..48f662f 100644 --- a/modules/core/src/test/config/spring-cache-load.xml +++ b/modules/core/src/test/config/spring-cache-load.xml @@ -51,7 +51,7 @@ <bean class="org.apache.ignite.configuration.CacheConfiguration"> <property name="cacheMode" value="PARTITIONED"/> - <property name="preloadMode" value="SYNC"/> + <property name="rebalanceMode" value="SYNC"/> </bean> </property> http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dc04e98c/modules/core/src/test/config/spring-multicache.xml ---------------------------------------------------------------------- diff --git a/modules/core/src/test/config/spring-multicache.xml b/modules/core/src/test/config/spring-multicache.xml index 9d9f959..7c84eee 100644 --- a/modules/core/src/test/config/spring-multicache.xml +++ b/modules/core/src/test/config/spring-multicache.xml @@ -70,7 +70,7 @@ <property name="writeSynchronizationMode" value="FULL_SYNC"/> - <property name="preloadMode" value="SYNC"/> + <property name="rebalanceMode" value="SYNC"/> <property name="evictionPolicy"> <bean class="org.apache.ignite.cache.eviction.lru.CacheLruEvictionPolicy"> @@ -92,7 +92,7 @@ <property name="writeSynchronizationMode" value="FULL_SYNC"/> - <property name="preloadMode" value="SYNC"/> + <property name="rebalanceMode" value="SYNC"/> <property name="evictionPolicy"> <bean class="org.apache.ignite.cache.eviction.lru.CacheLruEvictionPolicy"> @@ -114,7 +114,7 @@ <property name="writeSynchronizationMode" value="FULL_SYNC"/> - <property name="preloadMode" value="SYNC"/> + <property name="rebalanceMode" value="SYNC"/> <property name="evictionPolicy"> <bean class="org.apache.ignite.cache.eviction.lru.CacheLruEvictionPolicy"> @@ -136,7 +136,7 @@ <property name="writeSynchronizationMode" value="FULL_SYNC"/> - <property name="preloadMode" value="SYNC"/> + <property name="rebalanceMode" value="SYNC"/> <property name="evictionPolicy"> <bean class="org.apache.ignite.cache.eviction.lru.CacheLruEvictionPolicy"> @@ -159,7 +159,7 @@ <property name="writeSynchronizationMode" value="FULL_SYNC"/> - <property name="preloadMode" value="SYNC"/> + <property name="rebalanceMode" value="SYNC"/> <property name="evictionPolicy"> <bean class="org.apache.ignite.cache.eviction.lru.CacheLruEvictionPolicy"> @@ -181,7 +181,7 @@ <property name="writeSynchronizationMode" value="FULL_SYNC"/> - <property name="preloadMode" value="SYNC"/> + <property name="rebalanceMode" value="SYNC"/> <property name="evictionPolicy"> <bean class="org.apache.ignite.cache.eviction.lru.CacheLruEvictionPolicy"> @@ -203,7 +203,7 @@ <property name="writeSynchronizationMode" value="FULL_SYNC"/> - <property name="preloadMode" value="SYNC"/> + <property name="rebalanceMode" value="SYNC"/> <property name="evictionPolicy"> <bean class="org.apache.ignite.cache.eviction.lru.CacheLruEvictionPolicy"> @@ -225,7 +225,7 @@ <property name="writeSynchronizationMode" value="FULL_SYNC"/> - <property name="preloadMode" value="SYNC"/> + <property name="rebalanceMode" value="SYNC"/> <property name="evictionPolicy"> <bean class="org.apache.ignite.cache.eviction.lru.CacheLruEvictionPolicy"> http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dc04e98c/modules/core/src/test/config/websession/spring-cache-1.xml ---------------------------------------------------------------------- diff --git a/modules/core/src/test/config/websession/spring-cache-1.xml b/modules/core/src/test/config/websession/spring-cache-1.xml index 2bc770a..b5ca38f 100644 --- a/modules/core/src/test/config/websession/spring-cache-1.xml +++ b/modules/core/src/test/config/websession/spring-cache-1.xml @@ -46,7 +46,7 @@ <property name="backups" value="1"/> - <property name="preloadMode" value="SYNC"/> + <property name="rebalanceMode" value="SYNC"/> </bean> <bean class="org.apache.ignite.configuration.CacheConfiguration"> @@ -64,7 +64,7 @@ <property name="backups" value="1"/> - <property name="preloadMode" value="SYNC"/> + <property name="rebalanceMode" value="SYNC"/> </bean> <bean class="org.apache.ignite.configuration.CacheConfiguration"> @@ -78,7 +78,7 @@ <property name="atomicWriteOrderMode" value="PRIMARY"/> - <property name="preloadMode" value="SYNC"/> + <property name="rebalanceMode" value="SYNC"/> </bean> </list> </property> http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dc04e98c/modules/core/src/test/config/websession/spring-cache-2.xml ---------------------------------------------------------------------- diff --git a/modules/core/src/test/config/websession/spring-cache-2.xml b/modules/core/src/test/config/websession/spring-cache-2.xml index ca9d66b..9d07f04 100644 --- a/modules/core/src/test/config/websession/spring-cache-2.xml +++ b/modules/core/src/test/config/websession/spring-cache-2.xml @@ -46,7 +46,7 @@ <property name="backups" value="1"/> - <property name="preloadMode" value="SYNC"/> + <property name="rebalanceMode" value="SYNC"/> </bean> <bean class="org.apache.ignite.configuration.CacheConfiguration"> @@ -64,7 +64,7 @@ <property name="backups" value="1"/> - <property name="preloadMode" value="SYNC"/> + <property name="rebalanceMode" value="SYNC"/> </bean> <bean class="org.apache.ignite.configuration.CacheConfiguration"> @@ -78,7 +78,7 @@ <property name="atomicWriteOrderMode" value="PRIMARY"/> - <property name="preloadMode" value="SYNC"/> + <property name="rebalanceMode" value="SYNC"/> </bean> </list> </property> http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dc04e98c/modules/core/src/test/config/websession/spring-cache-3.xml ---------------------------------------------------------------------- diff --git a/modules/core/src/test/config/websession/spring-cache-3.xml b/modules/core/src/test/config/websession/spring-cache-3.xml index 8354836..f2f316d 100644 --- a/modules/core/src/test/config/websession/spring-cache-3.xml +++ b/modules/core/src/test/config/websession/spring-cache-3.xml @@ -46,7 +46,7 @@ <property name="backups" value="1"/> - <property name="preloadMode" value="SYNC"/> + <property name="rebalanceMode" value="SYNC"/> </bean> <bean class="org.apache.ignite.configuration.CacheConfiguration"> @@ -64,7 +64,7 @@ <property name="backups" value="1"/> - <property name="preloadMode" value="SYNC"/> + <property name="rebalanceMode" value="SYNC"/> </bean> <bean class="org.apache.ignite.configuration.CacheConfiguration"> @@ -78,7 +78,7 @@ <property name="atomicWriteOrderMode" value="PRIMARY"/> - <property name="preloadMode" value="SYNC"/> + <property name="rebalanceMode" value="SYNC"/> </bean> </list> </property> http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dc04e98c/modules/core/src/test/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManagerAliveCacheSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManagerAliveCacheSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManagerAliveCacheSelfTest.java index 433f9fa..b04ad78 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManagerAliveCacheSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManagerAliveCacheSelfTest.java @@ -35,7 +35,7 @@ import java.util.concurrent.*; import static org.apache.ignite.cache.CacheDistributionMode.*; import static org.apache.ignite.cache.CacheMode.*; -import static org.apache.ignite.cache.CachePreloadMode.*; +import static org.apache.ignite.cache.CacheRebalanceMode.*; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.*; /** @@ -83,7 +83,7 @@ public class GridDiscoveryManagerAliveCacheSelfTest extends GridCommonAbstractTe cCfg.setCacheMode(PARTITIONED); cCfg.setBackups(1); cCfg.setDistributionMode(NEAR_PARTITIONED); - cCfg.setPreloadMode(SYNC); + cCfg.setRebalanceMode(SYNC); cCfg.setQueryIndexEnabled(false); cCfg.setWriteSynchronizationMode(FULL_SYNC); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dc04e98c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFailoverSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFailoverSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFailoverSelfTest.java index f75d7d2..fa9a0c1 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFailoverSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFailoverSelfTest.java @@ -30,7 +30,7 @@ import org.jetbrains.annotations.*; import javax.cache.*; import java.util.*; -import static org.apache.ignite.cache.CachePreloadMode.*; +import static org.apache.ignite.cache.CacheRebalanceMode.*; import static org.apache.ignite.transactions.TransactionConcurrency.*; import static org.apache.ignite.transactions.TransactionIsolation.*; @@ -76,7 +76,7 @@ public abstract class GridCacheAbstractFailoverSelfTest extends GridCacheAbstrac @Override protected CacheConfiguration cacheConfiguration(String gridName) throws Exception { CacheConfiguration cfg = super.cacheConfiguration(gridName); - cfg.setPreloadMode(SYNC); + cfg.setRebalanceMode(SYNC); return cfg; } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dc04e98c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheBasicStoreAbstractTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheBasicStoreAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheBasicStoreAbstractTest.java index b80b201..69bcef2 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheBasicStoreAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheBasicStoreAbstractTest.java @@ -34,7 +34,7 @@ import java.util.*; import static org.apache.ignite.cache.CacheAtomicityMode.*; import static org.apache.ignite.cache.CacheDistributionMode.*; -import static org.apache.ignite.cache.CachePreloadMode.*; +import static org.apache.ignite.cache.CacheRebalanceMode.*; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.*; import static org.apache.ignite.transactions.TransactionConcurrency.*; import static org.apache.ignite.transactions.TransactionIsolation.*; @@ -89,7 +89,7 @@ public abstract class GridCacheBasicStoreAbstractTest extends GridCommonAbstract cc.setSwapEnabled(false); cc.setAtomicityMode(atomicityMode()); cc.setDistributionMode(distributionMode()); - cc.setPreloadMode(SYNC); + cc.setRebalanceMode(SYNC); cc.setCacheStoreFactory(new FactoryBuilder.SingletonFactory(store)); cc.setReadThrough(true); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dc04e98c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentTxMultiNodeTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentTxMultiNodeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentTxMultiNodeTest.java index 06904e5..3acfd94 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentTxMultiNodeTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentTxMultiNodeTest.java @@ -47,7 +47,7 @@ import java.util.concurrent.atomic.*; import static org.apache.ignite.cache.CacheDistributionMode.*; import static org.apache.ignite.cache.CacheMode.*; -import static org.apache.ignite.cache.CachePreloadMode.*; +import static org.apache.ignite.cache.CacheRebalanceMode.*; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.*; import static org.apache.ignite.transactions.TransactionConcurrency.*; import static org.apache.ignite.transactions.TransactionIsolation.*; @@ -117,7 +117,7 @@ public class GridCacheConcurrentTxMultiNodeTest extends GridCommonAbstractTest { cc.setEvictNearSynchronized(false); cc.setSwapEnabled(false); cc.setWriteSynchronizationMode(FULL_SYNC); - cc.setPreloadMode(NONE); + cc.setRebalanceMode(NONE); c.setCacheConfiguration(cc); } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dc04e98c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConfigurationConsistencySelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConfigurationConsistencySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConfigurationConsistencySelfTest.java index 3bd42dc..475a257 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConfigurationConsistencySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConfigurationConsistencySelfTest.java @@ -48,7 +48,7 @@ import java.util.concurrent.*; import static org.apache.ignite.cache.CacheAtomicityMode.*; import static org.apache.ignite.cache.CacheDistributionMode.*; import static org.apache.ignite.cache.CacheMode.*; -import static org.apache.ignite.cache.CachePreloadMode.*; +import static org.apache.ignite.cache.CacheRebalanceMode.*; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.*; import static org.apache.ignite.configuration.DeploymentMode.*; @@ -330,14 +330,14 @@ public class GridCacheConfigurationConsistencySelfTest extends GridCommonAbstrac new C1<CacheConfiguration, Void>() { /** {@inheritDoc} */ @Override public Void apply(CacheConfiguration cfg) { - cfg.setPreloadMode(NONE); + cfg.setRebalanceMode(NONE); return null; } }, new C1<CacheConfiguration, Void>() { /** {@inheritDoc} */ @Override public Void apply(CacheConfiguration cfg) { - cfg.setPreloadMode(ASYNC); + cfg.setRebalanceMode(ASYNC); return null; } } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dc04e98c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConfigurationValidationSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConfigurationValidationSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConfigurationValidationSelfTest.java index 8e5474a..30a9ba6 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConfigurationValidationSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConfigurationValidationSelfTest.java @@ -26,7 +26,7 @@ import org.apache.ignite.testframework.junits.common.*; import static org.apache.ignite.cache.CacheMemoryMode.*; import static org.apache.ignite.cache.CacheMode.*; -import static org.apache.ignite.cache.CachePreloadMode.*; +import static org.apache.ignite.cache.CacheRebalanceMode.*; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.*; /** @@ -81,7 +81,7 @@ public class GridCacheConfigurationValidationSelfTest extends GridCommonAbstract CacheConfiguration dfltCacheCfg = defaultCacheConfiguration(); dfltCacheCfg.setCacheMode(PARTITIONED); - dfltCacheCfg.setPreloadMode(ASYNC); + dfltCacheCfg.setRebalanceMode(ASYNC); dfltCacheCfg.setWriteSynchronizationMode(FULL_SYNC); dfltCacheCfg.setAffinity(new CacheConsistentHashAffinityFunction()); @@ -89,14 +89,14 @@ public class GridCacheConfigurationValidationSelfTest extends GridCommonAbstract CacheConfiguration namedCacheCfg = defaultCacheConfiguration(); namedCacheCfg.setCacheMode(PARTITIONED); - namedCacheCfg.setPreloadMode(ASYNC); + namedCacheCfg.setRebalanceMode(ASYNC); namedCacheCfg.setWriteSynchronizationMode(FULL_SYNC); namedCacheCfg.setName(NON_DFLT_CACHE_NAME); namedCacheCfg.setAffinity(new CacheConsistentHashAffinityFunction()); // Modify cache config according to test parameters. if (gridName.contains(WRONG_PRELOAD_MODE_GRID_NAME)) - dfltCacheCfg.setPreloadMode(SYNC); + dfltCacheCfg.setRebalanceMode(SYNC); else if (gridName.contains(WRONG_CACHE_MODE_GRID_NAME)) dfltCacheCfg.setCacheMode(REPLICATED); else if (gridName.contains(WRONG_AFFINITY_GRID_NAME)) { http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dc04e98c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentSelfTest.java index 2f1e9b0..8b5f3ec 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentSelfTest.java @@ -33,7 +33,7 @@ import java.util.*; import static org.apache.ignite.cache.CacheAtomicityMode.*; import static org.apache.ignite.cache.CacheDistributionMode.*; import static org.apache.ignite.cache.CacheMode.*; -import static org.apache.ignite.cache.CachePreloadMode.*; +import static org.apache.ignite.cache.CacheRebalanceMode.*; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.*; import static org.apache.ignite.configuration.DeploymentMode.*; @@ -101,7 +101,7 @@ public class GridCacheDeploymentSelfTest extends GridCommonAbstractTest { cfg.setCacheMode(PARTITIONED); cfg.setWriteSynchronizationMode(FULL_SYNC); - cfg.setPreloadMode(SYNC); + cfg.setRebalanceMode(SYNC); cfg.setStoreValueBytes(true); cfg.setAtomicityMode(TRANSACTIONAL); cfg.setDistributionMode(NEAR_PARTITIONED); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dc04e98c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheGetAndTransformStoreAbstractTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheGetAndTransformStoreAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheGetAndTransformStoreAbstractTest.java index 06c5b84..d890da9 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheGetAndTransformStoreAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheGetAndTransformStoreAbstractTest.java @@ -34,7 +34,7 @@ import java.util.concurrent.atomic.*; import static org.apache.ignite.cache.CacheAtomicityMode.*; import static org.apache.ignite.cache.CacheDistributionMode.*; -import static org.apache.ignite.cache.CachePreloadMode.*; +import static org.apache.ignite.cache.CacheRebalanceMode.*; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.*; /** @@ -87,7 +87,7 @@ public abstract class GridCacheGetAndTransformStoreAbstractTest extends GridComm cc.setSwapEnabled(false); cc.setAtomicityMode(atomicityMode()); cc.setDistributionMode(distributionMode()); - cc.setPreloadMode(SYNC); + cc.setRebalanceMode(SYNC); cc.setCacheStoreFactory(new FactoryBuilder.SingletonFactory(store)); cc.setReadThrough(true); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dc04e98c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheIncrementTransformTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheIncrementTransformTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheIncrementTransformTest.java index 320a2b6..6950d5c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheIncrementTransformTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheIncrementTransformTest.java @@ -36,7 +36,7 @@ import static org.apache.ignite.cache.CacheAtomicWriteOrderMode.*; import static org.apache.ignite.cache.CacheAtomicityMode.*; import static org.apache.ignite.cache.CacheDistributionMode.*; import static org.apache.ignite.cache.CacheMode.*; -import static org.apache.ignite.cache.CachePreloadMode.*; +import static org.apache.ignite.cache.CacheRebalanceMode.*; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.*; /** @@ -67,7 +67,7 @@ public class GridCacheIncrementTransformTest extends GridCommonAbstractTest { cache.setAtomicWriteOrderMode(PRIMARY); cache.setWriteSynchronizationMode(FULL_SYNC); cache.setBackups(1); - cache.setPreloadMode(SYNC); + cache.setRebalanceMode(SYNC); cfg.setCacheConfiguration(cache); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dc04e98c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMultiUpdateLockSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMultiUpdateLockSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMultiUpdateLockSelfTest.java index 750daef..0fcbaef 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMultiUpdateLockSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMultiUpdateLockSelfTest.java @@ -34,7 +34,7 @@ import java.util.concurrent.atomic.*; import static org.apache.ignite.cache.CacheDistributionMode.*; import static org.apache.ignite.cache.CacheMode.*; -import static org.apache.ignite.cache.CachePreloadMode.*; +import static org.apache.ignite.cache.CacheRebalanceMode.*; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.*; import static org.apache.ignite.transactions.TransactionConcurrency.*; import static org.apache.ignite.transactions.TransactionIsolation.*; @@ -77,7 +77,7 @@ public class GridCacheMultiUpdateLockSelfTest extends GridCommonAbstractTest { cfg.setDistributionMode(nearEnabled ? NEAR_PARTITIONED : PARTITIONED_ONLY); cfg.setWriteSynchronizationMode(FULL_SYNC); - cfg.setPreloadMode(SYNC); + cfg.setRebalanceMode(SYNC); return cfg; } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dc04e98c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOrderedPreloadingSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOrderedPreloadingSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOrderedPreloadingSelfTest.java index 7d81b98..81ee250 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOrderedPreloadingSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOrderedPreloadingSelfTest.java @@ -28,7 +28,7 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*; import org.apache.ignite.testframework.junits.common.*; import static org.apache.ignite.cache.CacheMode.*; -import static org.apache.ignite.cache.CachePreloadMode.*; +import static org.apache.ignite.cache.CacheRebalanceMode.*; /** * Checks ordered preloading. @@ -80,8 +80,8 @@ public class GridCacheOrderedPreloadingSelfTest extends GridCommonAbstractTest { cfg.setName(name); cfg.setCacheMode(cacheMode); - cfg.setPreloadOrder(preloadOrder); - cfg.setPreloadMode(ASYNC); + cfg.setRebalanceOrder(preloadOrder); + cfg.setRebalanceMode(ASYNC); return cfg; } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dc04e98c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheP2PUndeploySelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheP2PUndeploySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheP2PUndeploySelfTest.java index ea99af2..44c290f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheP2PUndeploySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheP2PUndeploySelfTest.java @@ -37,7 +37,7 @@ import java.util.concurrent.atomic.*; import static org.apache.ignite.cache.CacheAtomicityMode.*; import static org.apache.ignite.cache.CacheDistributionMode.*; import static org.apache.ignite.cache.CacheMode.*; -import static org.apache.ignite.cache.CachePreloadMode.*; +import static org.apache.ignite.cache.CacheRebalanceMode.*; import static org.apache.ignite.configuration.DeploymentMode.*; /** @@ -57,7 +57,7 @@ public class GridCacheP2PUndeploySelfTest extends GridCommonAbstractTest { private final AtomicInteger idxGen = new AtomicInteger(); /** */ - private CachePreloadMode mode = SYNC; + private CacheRebalanceMode mode = SYNC; /** */ private boolean offheap; @@ -82,7 +82,7 @@ public class GridCacheP2PUndeploySelfTest extends GridCommonAbstractTest { repCacheCfg.setName("replicated"); repCacheCfg.setCacheMode(REPLICATED); - repCacheCfg.setPreloadMode(mode); + repCacheCfg.setRebalanceMode(mode); repCacheCfg.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC); repCacheCfg.setQueryIndexEnabled(false); repCacheCfg.setAtomicityMode(TRANSACTIONAL); @@ -96,7 +96,7 @@ public class GridCacheP2PUndeploySelfTest extends GridCommonAbstractTest { partCacheCfg.setName("partitioned"); partCacheCfg.setCacheMode(PARTITIONED); - partCacheCfg.setPreloadMode(mode); + partCacheCfg.setRebalanceMode(mode); partCacheCfg.setAffinity(new GridCacheModuloAffinityFunction(11, 1)); partCacheCfg.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC); partCacheCfg.setEvictNearSynchronized(false); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dc04e98c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePartitionedGetSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePartitionedGetSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePartitionedGetSelfTest.java index 860bed5..85fca1a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePartitionedGetSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePartitionedGetSelfTest.java @@ -34,7 +34,7 @@ import java.util.concurrent.atomic.*; import static org.apache.ignite.cache.CacheDistributionMode.*; import static org.apache.ignite.cache.CacheMode.*; -import static org.apache.ignite.cache.CachePreloadMode.*; +import static org.apache.ignite.cache.CacheRebalanceMode.*; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.*; import static org.apache.ignite.internal.GridTopic.*; @@ -86,7 +86,7 @@ public class GridCachePartitionedGetSelfTest extends GridCommonAbstractTest { cc.setCacheMode(PARTITIONED); cc.setBackups(1); - cc.setPreloadMode(SYNC); + cc.setRebalanceMode(SYNC); cc.setWriteSynchronizationMode(FULL_SYNC); cc.setSwapEnabled(true); cc.setEvictNearSynchronized(false); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dc04e98c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePartitionedProjectionAffinitySelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePartitionedProjectionAffinitySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePartitionedProjectionAffinitySelfTest.java index 30e381e..56a4168 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePartitionedProjectionAffinitySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePartitionedProjectionAffinitySelfTest.java @@ -31,7 +31,7 @@ import org.apache.ignite.testframework.junits.common.*; import static org.apache.ignite.cache.CacheAtomicityMode.*; import static org.apache.ignite.cache.CacheDistributionMode.*; import static org.apache.ignite.cache.CacheMode.*; -import static org.apache.ignite.cache.CachePreloadMode.*; +import static org.apache.ignite.cache.CacheRebalanceMode.*; /** * Partitioned affinity test for projections. @@ -56,7 +56,7 @@ public class GridCachePartitionedProjectionAffinitySelfTest extends GridCommonAb cacheCfg.setCacheMode(PARTITIONED); cacheCfg.setBackups(BACKUPS); cacheCfg.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC); - cacheCfg.setPreloadMode(SYNC); + cacheCfg.setRebalanceMode(SYNC); cacheCfg.setAtomicityMode(TRANSACTIONAL); cacheCfg.setDistributionMode(NEAR_PARTITIONED); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dc04e98c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePreloadingEvictionsSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePreloadingEvictionsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePreloadingEvictionsSelfTest.java index c621827..742a70e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePreloadingEvictionsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePreloadingEvictionsSelfTest.java @@ -40,7 +40,7 @@ import java.util.concurrent.atomic.*; import static org.apache.ignite.cache.CacheAtomicityMode.*; import static org.apache.ignite.cache.CacheDistributionMode.*; import static org.apache.ignite.cache.CacheMode.*; -import static org.apache.ignite.cache.CachePreloadMode.*; +import static org.apache.ignite.cache.CacheRebalanceMode.*; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.*; import static org.apache.ignite.events.EventType.*; @@ -78,11 +78,11 @@ public class GridCachePreloadingEvictionsSelfTest extends GridCommonAbstractTest partCacheCfg.setEvictionPolicy(null); partCacheCfg.setEvictSynchronizedKeyBufferSize(25); partCacheCfg.setEvictMaxOverflowRatio(0.99f); - partCacheCfg.setPreloadMode(ASYNC); + partCacheCfg.setRebalanceMode(ASYNC); partCacheCfg.setAtomicityMode(TRANSACTIONAL); // This test requires artificial slowing down of the preloading. - partCacheCfg.setPreloadThrottle(2000); + partCacheCfg.setRebalanceThrottle(2000); cfg.setCacheConfiguration(partCacheCfg); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dc04e98c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryInternalKeysSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryInternalKeysSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryInternalKeysSelfTest.java index 6c0c583..63f9ef9 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryInternalKeysSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryInternalKeysSelfTest.java @@ -30,7 +30,7 @@ import org.jetbrains.annotations.*; import java.util.*; import static org.apache.ignite.cache.CacheMode.*; -import static org.apache.ignite.cache.CachePreloadMode.*; +import static org.apache.ignite.cache.CacheRebalanceMode.*; /** * Cache query internal keys self test. @@ -57,7 +57,7 @@ public class GridCacheQueryInternalKeysSelfTest extends GridCacheAbstractSelfTes CacheConfiguration cc = super.cacheConfiguration(gridName); cc.setQueryIndexEnabled(false); - cc.setPreloadMode(SYNC); + cc.setRebalanceMode(SYNC); return cc; } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dc04e98c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapPreloadSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapPreloadSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapPreloadSelfTest.java index 85a7838..5063ae2 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapPreloadSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapPreloadSelfTest.java @@ -33,7 +33,7 @@ import java.util.concurrent.atomic.*; import static org.apache.ignite.cache.CacheAtomicityMode.*; import static org.apache.ignite.cache.CacheMode.*; -import static org.apache.ignite.cache.CachePreloadMode.*; +import static org.apache.ignite.cache.CacheRebalanceMode.*; /** * Test for cache swap preloading. @@ -65,7 +65,7 @@ public class GridCacheSwapPreloadSelfTest extends GridCommonAbstractTest { cacheCfg.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC); cacheCfg.setSwapEnabled(true); cacheCfg.setCacheMode(cacheMode); - cacheCfg.setPreloadMode(SYNC); + cacheCfg.setRebalanceMode(SYNC); cacheCfg.setEvictSynchronized(false); cacheCfg.setEvictNearSynchronized(false); cacheCfg.setAtomicityMode(TRANSACTIONAL); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dc04e98c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheValueBytesPreloadingSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheValueBytesPreloadingSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheValueBytesPreloadingSelfTest.java index f8fa6b8..0ec068e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheValueBytesPreloadingSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheValueBytesPreloadingSelfTest.java @@ -60,7 +60,7 @@ public class GridCacheValueBytesPreloadingSelfTest extends GridCommonAbstractTes ccfg.setWriteSynchronizationMode(FULL_SYNC); ccfg.setMemoryMode(memMode); ccfg.setOffHeapMaxMemory(1024 * 1024 * 1024); - ccfg.setPreloadMode(CachePreloadMode.SYNC); + ccfg.setRebalanceMode(CacheRebalanceMode.SYNC); return ccfg; }