This is an automated email from the ASF dual-hosted git repository. dlmarion pushed a commit to branch elasticity in repository https://gitbox.apache.org/repos/asf/accumulo.git
The following commit(s) were added to refs/heads/elasticity by this push: new 91bfb62b65 Deprecated HostRegexTableLoadBalancer (#3641) 91bfb62b65 is described below commit 91bfb62b659aa3f1b0e363a1fc345ba409df693b Author: Dave Marion <dlmar...@apache.org> AuthorDate: Fri Jul 28 10:00:53 2023 -0400 Deprecated HostRegexTableLoadBalancer (#3641) --- .../accumulo/core/spi/balancer/HostRegexTableLoadBalancer.java | 3 +++ .../core/spi/balancer/BaseHostRegexTableLoadBalancerTest.java | 1 + .../HostRegexTableLoadBalancerReconfigurationTest.java | 1 + .../core/spi/balancer/HostRegexTableLoadBalancerTest.java | 1 + .../org/apache/accumulo/test/manager/SuspendedTabletsIT.java | 10 +++++++--- 5 files changed, 13 insertions(+), 3 deletions(-) diff --git a/core/src/main/java/org/apache/accumulo/core/spi/balancer/HostRegexTableLoadBalancer.java b/core/src/main/java/org/apache/accumulo/core/spi/balancer/HostRegexTableLoadBalancer.java index 431f8d86c6..0fe3ed04fc 100644 --- a/core/src/main/java/org/apache/accumulo/core/spi/balancer/HostRegexTableLoadBalancer.java +++ b/core/src/main/java/org/apache/accumulo/core/spi/balancer/HostRegexTableLoadBalancer.java @@ -90,7 +90,10 @@ import com.google.common.collect.Multimap; * <b>table.custom.balancer.host.regex.max.outstanding.migrations</b> * * @since 2.1.0 + * @deprecated See {@link TableLoadBalancer} as it provides similar functionality using server + * process resource group parameters. */ +@Deprecated(since = "4.0.0") public class HostRegexTableLoadBalancer extends TableLoadBalancer { private static final String PROP_PREFIX = Property.TABLE_ARBITRARY_PROP_PREFIX.getKey(); diff --git a/core/src/test/java/org/apache/accumulo/core/spi/balancer/BaseHostRegexTableLoadBalancerTest.java b/core/src/test/java/org/apache/accumulo/core/spi/balancer/BaseHostRegexTableLoadBalancerTest.java index e00350069a..98fcfcbe03 100644 --- a/core/src/test/java/org/apache/accumulo/core/spi/balancer/BaseHostRegexTableLoadBalancerTest.java +++ b/core/src/test/java/org/apache/accumulo/core/spi/balancer/BaseHostRegexTableLoadBalancerTest.java @@ -43,6 +43,7 @@ import org.apache.accumulo.core.spi.balancer.data.TabletStatistics; import org.apache.accumulo.core.tabletserver.thrift.TabletStats; import org.apache.hadoop.io.Text; +@Deprecated public abstract class BaseHostRegexTableLoadBalancerTest extends HostRegexTableLoadBalancer { protected static class TestTable { diff --git a/core/src/test/java/org/apache/accumulo/core/spi/balancer/HostRegexTableLoadBalancerReconfigurationTest.java b/core/src/test/java/org/apache/accumulo/core/spi/balancer/HostRegexTableLoadBalancerReconfigurationTest.java index f9f7d87345..c270dfd2ef 100644 --- a/core/src/test/java/org/apache/accumulo/core/spi/balancer/HostRegexTableLoadBalancerReconfigurationTest.java +++ b/core/src/test/java/org/apache/accumulo/core/spi/balancer/HostRegexTableLoadBalancerReconfigurationTest.java @@ -52,6 +52,7 @@ import org.apache.accumulo.core.util.ConfigurationImpl; import org.apache.accumulo.core.util.UtilWaitThread; import org.junit.jupiter.api.Test; +@Deprecated public class HostRegexTableLoadBalancerReconfigurationTest extends BaseHostRegexTableLoadBalancerTest { diff --git a/core/src/test/java/org/apache/accumulo/core/spi/balancer/HostRegexTableLoadBalancerTest.java b/core/src/test/java/org/apache/accumulo/core/spi/balancer/HostRegexTableLoadBalancerTest.java index 52356af6f7..760cb94a12 100644 --- a/core/src/test/java/org/apache/accumulo/core/spi/balancer/HostRegexTableLoadBalancerTest.java +++ b/core/src/test/java/org/apache/accumulo/core/spi/balancer/HostRegexTableLoadBalancerTest.java @@ -58,6 +58,7 @@ import org.apache.accumulo.core.util.ConfigurationImpl; import org.apache.accumulo.core.util.UtilWaitThread; import org.junit.jupiter.api.Test; +@Deprecated public class HostRegexTableLoadBalancerTest extends BaseHostRegexTableLoadBalancerTest { public void init(Map<String,String> tableProperties) { diff --git a/test/src/main/java/org/apache/accumulo/test/manager/SuspendedTabletsIT.java b/test/src/main/java/org/apache/accumulo/test/manager/SuspendedTabletsIT.java index 52bd5a518b..49f785a9ab 100644 --- a/test/src/main/java/org/apache/accumulo/test/manager/SuspendedTabletsIT.java +++ b/test/src/main/java/org/apache/accumulo/test/manager/SuspendedTabletsIT.java @@ -103,7 +103,9 @@ public class SuspendedTabletsIT extends ConfigurableMacBase { // Start with 1 tserver, we'll increase that later cfg.getClusterServerConfiguration().setNumDefaultTabletServers(1); // config custom balancer to keep all metadata on one server - cfg.setProperty(HostRegexTableLoadBalancer.HOST_BALANCER_OOB_CHECK_KEY, "1ms"); + @SuppressWarnings("deprecation") + String p = HostRegexTableLoadBalancer.HOST_BALANCER_OOB_CHECK_KEY; + cfg.setProperty(p, "1ms"); cfg.setProperty(Property.MANAGER_TABLET_BALANCER.getKey(), HostAndPortRegexTableLoadBalancer.class.getName()); } @@ -125,8 +127,9 @@ public class SuspendedTabletsIT extends ConfigurableMacBase { } HostAndPort metadataServer = HostAndPort.fromString(tservers.get(0)); log.info("Configuring balancer to assign all metadata tablets to {}", metadataServer); - iops.setProperty(HostRegexTableLoadBalancer.HOST_BALANCER_PREFIX + MetadataTable.NAME, - metadataServer.toString()); + @SuppressWarnings("deprecation") + String p = HostRegexTableLoadBalancer.HOST_BALANCER_PREFIX; + iops.setProperty(p + MetadataTable.NAME, metadataServer.toString()); // Wait for the balancer to assign all metadata tablets to the chosen server. ClientContext ctx = (ClientContext) client; @@ -351,6 +354,7 @@ public class SuspendedTabletsIT extends ConfigurableMacBase { * multiple tablet servers are running on the same host and one wishes to make pools from the * tablet servers on that host. */ + @SuppressWarnings("deprecation") public static class HostAndPortRegexTableLoadBalancer extends HostRegexTableLoadBalancer { private static final Logger LOG = LoggerFactory.getLogger(HostAndPortRegexTableLoadBalancer.class.getName());