This is an automated email from the ASF dual-hosted git repository. dlmarion pushed a commit to branch 2.1 in repository https://gitbox.apache.org/repos/asf/accumulo.git
The following commit(s) were added to refs/heads/2.1 by this push: new db03e34422 Bump dependencies where possible and fix related issues (#5450) db03e34422 is described below commit db03e34422cb24664cee18739b5e6b47abb80d3c Author: Dave Marion <dlmar...@apache.org> AuthorDate: Thu Apr 3 16:04:16 2025 -0400 Bump dependencies where possible and fix related issues (#5450) Co-authored-by: Christopher Tubbs <ctubb...@apache.org> --- .../standalone/StandaloneClusterControl.java | 3 +- pom.xml | 48 +++++++++++----------- .../accumulo/manager/state/SetGoalState.java | 7 +++- .../accumulo/shell/commands/MergeCommand.java | 6 ++- .../accumulo/shell/commands/SetIterCommand.java | 2 +- .../shell/commands/SetIterCommandTest.java | 2 +- 6 files changed, 37 insertions(+), 31 deletions(-) diff --git a/minicluster/src/main/java/org/apache/accumulo/cluster/standalone/StandaloneClusterControl.java b/minicluster/src/main/java/org/apache/accumulo/cluster/standalone/StandaloneClusterControl.java index e9b0f747e7..cbd2b362ce 100644 --- a/minicluster/src/main/java/org/apache/accumulo/cluster/standalone/StandaloneClusterControl.java +++ b/minicluster/src/main/java/org/apache/accumulo/cluster/standalone/StandaloneClusterControl.java @@ -18,7 +18,6 @@ */ package org.apache.accumulo.cluster.standalone; -import static com.google.common.base.Preconditions.checkArgument; import static java.nio.charset.StandardCharsets.UTF_8; import static java.util.Objects.requireNonNull; @@ -150,7 +149,7 @@ public class StandaloneClusterControl implements ClusterControl { */ public void setGoalState(String goalState) throws IOException { requireNonNull(goalState, "Goal state must not be null"); - checkArgument(ManagerGoalState.valueOf(goalState) != null, "Unknown goal state: " + goalState); + ManagerGoalState.valueOf(goalState); String manager = getHosts(MANAGER_HOSTS_FILE).get(0); String[] cmd = {serverCmdPrefix, accumuloPath, SetGoalState.class.getName(), goalState}; Entry<Integer,String> pair = exec(manager, cmd); diff --git a/pom.xml b/pom.xml index 1957ef1177..5530079111 100644 --- a/pom.xml +++ b/pom.xml @@ -147,14 +147,14 @@ <unitTestMemSize>-Xmx1G</unitTestMemSize> <!-- dependency and plugin versions managed with properties --> <version.auto-service>1.1.1</version.auto-service> - <version.bouncycastle>1.78.1</version.bouncycastle> - <version.curator>5.5.0</version.curator> - <version.errorprone>2.24.1</version.errorprone> + <version.bouncycastle>1.80</version.bouncycastle> + <version.curator>5.8.0</version.curator> + <version.errorprone>2.35.0</version.errorprone> <version.hadoop>3.3.6</version.hadoop> - <version.log4j>2.24.0</version.log4j> - <version.opentelemetry>1.34.1</version.opentelemetry> + <version.log4j>2.24.3</version.log4j> + <version.opentelemetry>1.48.0</version.opentelemetry> <version.powermock>2.0.9</version.powermock> - <version.slf4j>2.0.12</version.slf4j> + <version.slf4j>2.0.17</version.slf4j> <version.thrift>0.17.0</version.thrift> <version.zookeeper>3.9.2</version.zookeeper> </properties> @@ -163,14 +163,14 @@ <dependency> <groupId>com.fasterxml.jackson</groupId> <artifactId>jackson-bom</artifactId> - <version>2.16.1</version> + <version>2.18.3</version> <type>pom</type> <scope>import</scope> </dependency> <dependency> <groupId>io.micrometer</groupId> <artifactId>micrometer-bom</artifactId> - <version>1.12.2</version> + <version>1.14.5</version> <type>pom</type> <scope>import</scope> </dependency> @@ -235,7 +235,7 @@ <dependency> <groupId>org.junit</groupId> <artifactId>junit-bom</artifactId> - <version>5.10.1</version> + <version>5.12.1</version> <type>pom</type> <scope>import</scope> </dependency> @@ -252,12 +252,12 @@ <dependency> <groupId>com.github.ben-manes.caffeine</groupId> <artifactId>caffeine</artifactId> - <version>3.1.8</version> + <version>3.2.0</version> </dependency> <dependency> <groupId>com.github.spotbugs</groupId> <artifactId>spotbugs-annotations</artifactId> - <version>4.8.3</version> + <version>4.9.3</version> </dependency> <dependency> <groupId>com.google.auto.service</groupId> @@ -272,7 +272,7 @@ <dependency> <groupId>com.google.code.gson</groupId> <artifactId>gson</artifactId> - <version>2.10.1</version> + <version>2.12.1</version> </dependency> <dependency> <!-- converge transitive dependency version between guava and caffeine --> @@ -289,7 +289,7 @@ <dependency> <groupId>com.google.guava</groupId> <artifactId>guava</artifactId> - <version>33.0.0-jre</version> + <version>33.4.6-jre</version> </dependency> <dependency> <groupId>com.google.protobuf</groupId> @@ -305,22 +305,22 @@ <dependency> <groupId>commons-cli</groupId> <artifactId>commons-cli</artifactId> - <version>1.6.0</version> + <version>1.9.0</version> </dependency> <dependency> <groupId>commons-codec</groupId> <artifactId>commons-codec</artifactId> - <version>1.16.0</version> + <version>1.18.0</version> </dependency> <dependency> <groupId>commons-io</groupId> <artifactId>commons-io</artifactId> - <version>2.15.1</version> + <version>2.18.0</version> </dependency> <dependency> <groupId>commons-logging</groupId> <artifactId>commons-logging</artifactId> - <version>1.3.3</version> + <version>1.3.5</version> </dependency> <dependency> <!-- legacy junit version specified here for dependency convergence --> @@ -417,7 +417,7 @@ <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-configuration2</artifactId> - <version>2.10.1</version> + <version>2.11.0</version> </dependency> <dependency> <groupId>org.apache.commons</groupId> @@ -432,7 +432,7 @@ <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-lang3</artifactId> - <version>3.14.0</version> + <version>3.17.0</version> </dependency> <dependency> <groupId>org.apache.commons</groupId> @@ -442,7 +442,7 @@ <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-text</artifactId> - <version>1.11.0</version> + <version>1.13.0</version> </dependency> <dependency> <groupId>org.apache.commons</groupId> @@ -566,17 +566,17 @@ <dependency> <groupId>org.checkerframework</groupId> <artifactId>checker-qual</artifactId> - <version>3.42.0</version> + <version>3.49.2</version> </dependency> <dependency> <groupId>org.easymock</groupId> <artifactId>easymock</artifactId> - <version>5.2.0</version> + <version>5.5.0</version> </dependency> <dependency> <groupId>org.freemarker</groupId> <artifactId>freemarker</artifactId> - <version>2.3.32</version> + <version>2.3.34</version> </dependency> <dependency> <groupId>org.glassfish</groupId> @@ -671,7 +671,7 @@ <dependency> <groupId>org.yaml</groupId> <artifactId>snakeyaml</artifactId> - <version>2.2</version> + <version>2.4</version> </dependency> </dependencies> </dependencyManagement> diff --git a/server/manager/src/main/java/org/apache/accumulo/manager/state/SetGoalState.java b/server/manager/src/main/java/org/apache/accumulo/manager/state/SetGoalState.java index 2134a51bcf..ad7cf9abd5 100644 --- a/server/manager/src/main/java/org/apache/accumulo/manager/state/SetGoalState.java +++ b/server/manager/src/main/java/org/apache/accumulo/manager/state/SetGoalState.java @@ -30,13 +30,18 @@ import org.apache.accumulo.manager.upgrade.RenameMasterDirInZK; import org.apache.accumulo.server.ServerContext; import org.apache.accumulo.server.security.SecurityUtil; +import com.google.common.base.Preconditions; + public class SetGoalState { /** * Utility program that will change the goal state for the manager from the command line. */ public static void main(String[] args) throws Exception { - if (args.length != 1 || ManagerGoalState.valueOf(args[0]) == null) { + try { + Preconditions.checkArgument(args.length == 1); + ManagerGoalState.valueOf(args[0]); + } catch (IllegalArgumentException e) { System.err.println( "Usage: accumulo " + SetGoalState.class.getName() + " [NORMAL|SAFE_MODE|CLEAN_STOP]"); System.exit(-1); diff --git a/shell/src/main/java/org/apache/accumulo/shell/commands/MergeCommand.java b/shell/src/main/java/org/apache/accumulo/shell/commands/MergeCommand.java index 18ac667297..b5d8836a78 100644 --- a/shell/src/main/java/org/apache/accumulo/shell/commands/MergeCommand.java +++ b/shell/src/main/java/org/apache/accumulo/shell/commands/MergeCommand.java @@ -95,9 +95,11 @@ public class MergeCommand extends Command { new Option("s", "size", true, "merge tablets to the given size over the entire table"); forceOpt = new Option("f", "force", false, "merge small tablets to large tablets, even if it goes over the given size"); - allOpt = new Option("", "all", false, - "allow an entire table to be merged into one tablet without prompting" + // Using the constructor does not allow for empty option + Option.Builder builder = Option.builder().longOpt("all").hasArg(false) + .desc("allow an entire table to be merged into one tablet without prompting" + " the user for confirmation"); + allOpt = builder.build(); o.addOption(OptUtil.startRowOpt()); o.addOption(OptUtil.endRowOpt()); o.addOption(OptUtil.tableOpt("table to be merged")); diff --git a/shell/src/main/java/org/apache/accumulo/shell/commands/SetIterCommand.java b/shell/src/main/java/org/apache/accumulo/shell/commands/SetIterCommand.java index 48e8befbd3..6e4eed888f 100644 --- a/shell/src/main/java/org/apache/accumulo/shell/commands/SetIterCommand.java +++ b/shell/src/main/java/org/apache/accumulo/shell/commands/SetIterCommand.java @@ -109,7 +109,7 @@ public class SetIterCommand extends Command { } // Try to get the name provided by the setiter command - String name = cl.getOptionValue(nameOpt.getOpt(), null); + String name = cl.getOptionValue(nameOpt.getOpt()); // Cannot continue if no name is provided if (name == null && configuredName == null) { diff --git a/shell/src/test/java/org/apache/accumulo/shell/commands/SetIterCommandTest.java b/shell/src/test/java/org/apache/accumulo/shell/commands/SetIterCommandTest.java index c265483ac1..0f9994d426 100644 --- a/shell/src/test/java/org/apache/accumulo/shell/commands/SetIterCommandTest.java +++ b/shell/src/test/java/org/apache/accumulo/shell/commands/SetIterCommandTest.java @@ -69,7 +69,7 @@ public class SetIterCommandTest { EasyMock.expect(cli.hasOption("regex")).andReturn(false); EasyMock.expect(cli.hasOption("reqvis")).andReturn(false); EasyMock.expect(cli.hasOption("vers")).andReturn(false); - EasyMock.expect(cli.getOptionValue("n", null)).andReturn(null); + EasyMock.expect(cli.getOptionValue("n")).andReturn(null); // Loading the class EasyMock.expect(shellState.getClassLoader(cli, shellState))