diff --git a/docs/_docs/data-rebalancing.adoc b/docs/_docs/data-rebalancing.adoc index 21af78dd07fea..9a7b7144a8cb4 100644 --- a/docs/_docs/data-rebalancing.adoc +++ b/docs/_docs/data-rebalancing.adoc @@ -127,21 +127,23 @@ tab:C++[unsupported] == Other Properties -The following table lists the properties of `CacheConfiguration` related to rebalancing: +The following table lists the properties of `IgniteConfiguration` related to rebalancing: [CAUTION] ==== -`rebalanceDelay` and related API's are deprecated and will be removed in the next releases. +`AVAILABLE_PROC_CNT` - Default core size of public thread pool. + ==== [cols="1,4,1",opts="header"] |=== | Property | Description | Default Value -| `rebalanceDelay` | A delay in milliseconds before the rebalancing process starts after a node joins or leaves the topology. Rebalancing delay is useful if you plan to restart nodes or start multiple nodes at once or one after another and don't want to repartition and rebalance the data until all nodes are started. -|0 (no delay) +| `rebalanceThreadPoolSize` |Rebalance thread pool size. Limit of threads used for rebalance. | min(4, max(1, AVAILABLE_PROC_CNT / 4)) |`rebalanceBatchSize` | The size in bytes of a single rebalance message. The rebalancing algorithm splits the data on every node into multiple batches prior to sending it to other nodes. | 512KB +|`rebalanceBatchesPrefetchCnt` | Rebalance batches prefetch count. | 3 + |`rebalanceThrottle` | See <<#throttling>>.| 0 (throttling disabled) | `rebalanceOrder` | The order in which rebalancing should be done. Rebalance order can be set to a non-zero value for caches with SYNC or ASYNC rebalance modes only. Rebalancing for caches with smaller rebalance order is completed first. By default, rebalancing is not ordered. | 0 diff --git a/modules/core/src/main/java/org/apache/ignite/client/ClientCacheConfiguration.java b/modules/core/src/main/java/org/apache/ignite/client/ClientCacheConfiguration.java index 17735e8eea81e..01b3eed927429 100644 --- a/modules/core/src/main/java/org/apache/ignite/client/ClientCacheConfiguration.java +++ b/modules/core/src/main/java/org/apache/ignite/client/ClientCacheConfiguration.java @@ -53,7 +53,11 @@ public final class ClientCacheConfiguration implements Serializable { /** @serial Group name. */ private String grpName = null; - /** @serial Default lock timeout. */ + /** + * @serial Default lock timeout. + * @deprecated Default lock timeout configuration property has no effect. + */ + @Deprecated private long dfltLockTimeout = CacheConfiguration.DFLT_LOCK_TIMEOUT; /** @serial Partition loss policy. */ @@ -63,9 +67,11 @@ public final class ClientCacheConfiguration implements Serializable { private boolean readFromBackup = CacheConfiguration.DFLT_READ_FROM_BACKUP; /** @serial Rebalance batch size. */ + @Deprecated private int rebalanceBatchSize = IgniteConfiguration.DFLT_REBALANCE_BATCH_SIZE; /** @serial Rebalance batches prefetch count. */ + @Deprecated private long rebalanceBatchesPrefetchCnt = IgniteConfiguration.DFLT_REBALANCE_BATCHES_PREFETCH_COUNT; /** @serial Rebalance delay. */ @@ -78,9 +84,11 @@ public final class ClientCacheConfiguration implements Serializable { private int rebalanceOrder = 0; /** @serial Rebalance throttle. */ + @Deprecated private long rebalanceThrottle = IgniteConfiguration.DFLT_REBALANCE_THROTTLE; - /** @serial @serial Rebalance timeout. */ + /** @serial Rebalance timeout. */ + @Deprecated private long rebalanceTimeout = IgniteConfiguration.DFLT_REBALANCE_TIMEOUT; /** @serial Write synchronization mode. */ @@ -287,7 +295,9 @@ public ClientCacheConfiguration setGroupName(String newVal) { /** * @return Default lock acquisition timeout. {@code 0} and means that lock acquisition will never timeout. + * @deprecated Default lock timeout configuration property has no effect. */ + @Deprecated public long getDefaultLockTimeout() { return dfltLockTimeout; } @@ -295,7 +305,9 @@ public long getDefaultLockTimeout() { /** * @param dfltLockTimeout Default lock timeout. * @return {@code this} for chaining. + * @deprecated Default lock timeout configuration property has no effect. */ + @Deprecated public ClientCacheConfiguration setDefaultLockTimeout(long dfltLockTimeout) { this.dfltLockTimeout = dfltLockTimeout; @@ -342,7 +354,10 @@ public ClientCacheConfiguration setReadFromBackup(boolean readFromBackup) { * @return Size (in number bytes) to be loaded within a single rebalance message. * Rebalancing algorithm will split total data set on every node into multiple * batches prior to sending data. + * + * @deprecated Use {@link IgniteConfiguration#getRebalanceBatchSize()} instead. */ + @Deprecated public int getRebalanceBatchSize() { return rebalanceBatchSize; } @@ -350,7 +365,9 @@ public int getRebalanceBatchSize() { /** * @param rebalanceBatchSize Rebalance batch size. * @return {@code this} for chaining. + * @deprecated Use {@link IgniteConfiguration#setRebalanceBatchSize(int)} instead. */ + @Deprecated public ClientCacheConfiguration setRebalanceBatchSize(int rebalanceBatchSize) { this.rebalanceBatchSize = rebalanceBatchSize; @@ -363,7 +380,10 @@ public ClientCacheConfiguration setRebalanceBatchSize(int rebalanceBatchSize) { * * @return Number of batches generated by supply node at rebalancing start. * Minimum is 1. + * + * @deprecated Use {@link IgniteConfiguration#getRebalanceBatchesPrefetchCount()} instead */ + @Deprecated public long getRebalanceBatchesPrefetchCount() { return rebalanceBatchesPrefetchCnt; } @@ -371,7 +391,9 @@ public long getRebalanceBatchesPrefetchCount() { /** * @param rebalanceBatchesPrefetchCnt Rebalance batches prefetch count. * @return {@code this} for chaining. + * @deprecated Use {@link IgniteConfiguration#getRebalanceBatchesPrefetchCount()} instead */ + @Deprecated public ClientCacheConfiguration setRebalanceBatchesPrefetchCount(long rebalanceBatchesPrefetchCnt) { this.rebalanceBatchesPrefetchCnt = rebalanceBatchesPrefetchCnt; @@ -388,7 +410,10 @@ public ClientCacheConfiguration setRebalanceBatchesPrefetchCount(long rebalanceB * immediately upon node leaving topology. If {@code -1} is returned, then rebalancing * will only be started manually. *

+ * + * @deprecated Use baseline topology feature instead. Please, be aware this API will be removed in the next releases. */ + @Deprecated public long getRebalanceDelay() { return rebalanceDelay; } @@ -396,7 +421,9 @@ public long getRebalanceDelay() { /** * @param rebalanceDelay Rebalance delay. * @return {@code this} for chaining. + * @deprecated Use baseline topology feature instead. Please, be aware this API will be removed in the next releases. */ + @Deprecated public ClientCacheConfiguration setRebalanceDelay(long rebalanceDelay) { this.rebalanceDelay = rebalanceDelay; @@ -458,7 +485,10 @@ public ClientCacheConfiguration setRebalanceOrder(int rebalanceOrder) { *

* Default value of {@code 0} means that throttling is disabled. *

+ * + * @deprecated Use {@link IgniteConfiguration#getRebalanceThrottle()} instead. */ + @Deprecated public long getRebalanceThrottle() { return rebalanceThrottle; } @@ -466,7 +496,9 @@ public long getRebalanceThrottle() { /** * @param newVal Rebalance throttle. * @return {@code this} for chaining. + * @deprecated Use {@link IgniteConfiguration#setRebalanceThrottle(long)} instead. */ + @Deprecated public ClientCacheConfiguration setRebalanceThrottle(long newVal) { rebalanceThrottle = newVal; @@ -475,7 +507,9 @@ public ClientCacheConfiguration setRebalanceThrottle(long newVal) { /** * @return Rebalance timeout (ms). + * @deprecated Use {@link IgniteConfiguration#getRebalanceTimeout()} instead. */ + @Deprecated public long getRebalanceTimeout() { return rebalanceTimeout; } @@ -483,7 +517,9 @@ public long getRebalanceTimeout() { /** * @param newVal Rebalance timeout. * @return {@code this} for chaining. + * @deprecated Use {@link IgniteConfiguration#getRebalanceTimeout()} instead. */ + @Deprecated public ClientCacheConfiguration setRebalanceTimeout(long newVal) { rebalanceTimeout = newVal;