Skip to content

Commit db03e34

Browse files
dlmarionctubbsii
andauthored
Bump dependencies where possible and fix related issues (apache#5450)
Co-authored-by: Christopher Tubbs <[email protected]>
1 parent c1ce4c7 commit db03e34

File tree

6 files changed

+37
-31
lines changed

6 files changed

+37
-31
lines changed

minicluster/src/main/java/org/apache/accumulo/cluster/standalone/StandaloneClusterControl.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
*/
1919
package org.apache.accumulo.cluster.standalone;
2020

21-
import static com.google.common.base.Preconditions.checkArgument;
2221
import static java.nio.charset.StandardCharsets.UTF_8;
2322
import static java.util.Objects.requireNonNull;
2423

@@ -150,7 +149,7 @@ public void adminStopAll() throws IOException {
150149
*/
151150
public void setGoalState(String goalState) throws IOException {
152151
requireNonNull(goalState, "Goal state must not be null");
153-
checkArgument(ManagerGoalState.valueOf(goalState) != null, "Unknown goal state: " + goalState);
152+
ManagerGoalState.valueOf(goalState);
154153
String manager = getHosts(MANAGER_HOSTS_FILE).get(0);
155154
String[] cmd = {serverCmdPrefix, accumuloPath, SetGoalState.class.getName(), goalState};
156155
Entry<Integer,String> pair = exec(manager, cmd);

pom.xml

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -147,14 +147,14 @@
147147
<unitTestMemSize>-Xmx1G</unitTestMemSize>
148148
<!-- dependency and plugin versions managed with properties -->
149149
<version.auto-service>1.1.1</version.auto-service>
150-
<version.bouncycastle>1.78.1</version.bouncycastle>
151-
<version.curator>5.5.0</version.curator>
152-
<version.errorprone>2.24.1</version.errorprone>
150+
<version.bouncycastle>1.80</version.bouncycastle>
151+
<version.curator>5.8.0</version.curator>
152+
<version.errorprone>2.35.0</version.errorprone>
153153
<version.hadoop>3.3.6</version.hadoop>
154-
<version.log4j>2.24.0</version.log4j>
155-
<version.opentelemetry>1.34.1</version.opentelemetry>
154+
<version.log4j>2.24.3</version.log4j>
155+
<version.opentelemetry>1.48.0</version.opentelemetry>
156156
<version.powermock>2.0.9</version.powermock>
157-
<version.slf4j>2.0.12</version.slf4j>
157+
<version.slf4j>2.0.17</version.slf4j>
158158
<version.thrift>0.17.0</version.thrift>
159159
<version.zookeeper>3.9.2</version.zookeeper>
160160
</properties>
@@ -163,14 +163,14 @@
163163
<dependency>
164164
<groupId>com.fasterxml.jackson</groupId>
165165
<artifactId>jackson-bom</artifactId>
166-
<version>2.16.1</version>
166+
<version>2.18.3</version>
167167
<type>pom</type>
168168
<scope>import</scope>
169169
</dependency>
170170
<dependency>
171171
<groupId>io.micrometer</groupId>
172172
<artifactId>micrometer-bom</artifactId>
173-
<version>1.12.2</version>
173+
<version>1.14.5</version>
174174
<type>pom</type>
175175
<scope>import</scope>
176176
</dependency>
@@ -235,7 +235,7 @@
235235
<dependency>
236236
<groupId>org.junit</groupId>
237237
<artifactId>junit-bom</artifactId>
238-
<version>5.10.1</version>
238+
<version>5.12.1</version>
239239
<type>pom</type>
240240
<scope>import</scope>
241241
</dependency>
@@ -252,12 +252,12 @@
252252
<dependency>
253253
<groupId>com.github.ben-manes.caffeine</groupId>
254254
<artifactId>caffeine</artifactId>
255-
<version>3.1.8</version>
255+
<version>3.2.0</version>
256256
</dependency>
257257
<dependency>
258258
<groupId>com.github.spotbugs</groupId>
259259
<artifactId>spotbugs-annotations</artifactId>
260-
<version>4.8.3</version>
260+
<version>4.9.3</version>
261261
</dependency>
262262
<dependency>
263263
<groupId>com.google.auto.service</groupId>
@@ -272,7 +272,7 @@
272272
<dependency>
273273
<groupId>com.google.code.gson</groupId>
274274
<artifactId>gson</artifactId>
275-
<version>2.10.1</version>
275+
<version>2.12.1</version>
276276
</dependency>
277277
<dependency>
278278
<!-- converge transitive dependency version between guava and caffeine -->
@@ -289,7 +289,7 @@
289289
<dependency>
290290
<groupId>com.google.guava</groupId>
291291
<artifactId>guava</artifactId>
292-
<version>33.0.0-jre</version>
292+
<version>33.4.6-jre</version>
293293
</dependency>
294294
<dependency>
295295
<groupId>com.google.protobuf</groupId>
@@ -305,22 +305,22 @@
305305
<dependency>
306306
<groupId>commons-cli</groupId>
307307
<artifactId>commons-cli</artifactId>
308-
<version>1.6.0</version>
308+
<version>1.9.0</version>
309309
</dependency>
310310
<dependency>
311311
<groupId>commons-codec</groupId>
312312
<artifactId>commons-codec</artifactId>
313-
<version>1.16.0</version>
313+
<version>1.18.0</version>
314314
</dependency>
315315
<dependency>
316316
<groupId>commons-io</groupId>
317317
<artifactId>commons-io</artifactId>
318-
<version>2.15.1</version>
318+
<version>2.18.0</version>
319319
</dependency>
320320
<dependency>
321321
<groupId>commons-logging</groupId>
322322
<artifactId>commons-logging</artifactId>
323-
<version>1.3.3</version>
323+
<version>1.3.5</version>
324324
</dependency>
325325
<dependency>
326326
<!-- legacy junit version specified here for dependency convergence -->
@@ -417,7 +417,7 @@
417417
<dependency>
418418
<groupId>org.apache.commons</groupId>
419419
<artifactId>commons-configuration2</artifactId>
420-
<version>2.10.1</version>
420+
<version>2.11.0</version>
421421
</dependency>
422422
<dependency>
423423
<groupId>org.apache.commons</groupId>
@@ -432,7 +432,7 @@
432432
<dependency>
433433
<groupId>org.apache.commons</groupId>
434434
<artifactId>commons-lang3</artifactId>
435-
<version>3.14.0</version>
435+
<version>3.17.0</version>
436436
</dependency>
437437
<dependency>
438438
<groupId>org.apache.commons</groupId>
@@ -442,7 +442,7 @@
442442
<dependency>
443443
<groupId>org.apache.commons</groupId>
444444
<artifactId>commons-text</artifactId>
445-
<version>1.11.0</version>
445+
<version>1.13.0</version>
446446
</dependency>
447447
<dependency>
448448
<groupId>org.apache.commons</groupId>
@@ -566,17 +566,17 @@
566566
<dependency>
567567
<groupId>org.checkerframework</groupId>
568568
<artifactId>checker-qual</artifactId>
569-
<version>3.42.0</version>
569+
<version>3.49.2</version>
570570
</dependency>
571571
<dependency>
572572
<groupId>org.easymock</groupId>
573573
<artifactId>easymock</artifactId>
574-
<version>5.2.0</version>
574+
<version>5.5.0</version>
575575
</dependency>
576576
<dependency>
577577
<groupId>org.freemarker</groupId>
578578
<artifactId>freemarker</artifactId>
579-
<version>2.3.32</version>
579+
<version>2.3.34</version>
580580
</dependency>
581581
<dependency>
582582
<groupId>org.glassfish</groupId>
@@ -671,7 +671,7 @@
671671
<dependency>
672672
<groupId>org.yaml</groupId>
673673
<artifactId>snakeyaml</artifactId>
674-
<version>2.2</version>
674+
<version>2.4</version>
675675
</dependency>
676676
</dependencies>
677677
</dependencyManagement>

server/manager/src/main/java/org/apache/accumulo/manager/state/SetGoalState.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,18 @@
3030
import org.apache.accumulo.server.ServerContext;
3131
import org.apache.accumulo.server.security.SecurityUtil;
3232

33+
import com.google.common.base.Preconditions;
34+
3335
public class SetGoalState {
3436

3537
/**
3638
* Utility program that will change the goal state for the manager from the command line.
3739
*/
3840
public static void main(String[] args) throws Exception {
39-
if (args.length != 1 || ManagerGoalState.valueOf(args[0]) == null) {
41+
try {
42+
Preconditions.checkArgument(args.length == 1);
43+
ManagerGoalState.valueOf(args[0]);
44+
} catch (IllegalArgumentException e) {
4045
System.err.println(
4146
"Usage: accumulo " + SetGoalState.class.getName() + " [NORMAL|SAFE_MODE|CLEAN_STOP]");
4247
System.exit(-1);

shell/src/main/java/org/apache/accumulo/shell/commands/MergeCommand.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,11 @@ public Options getOptions() {
9595
new Option("s", "size", true, "merge tablets to the given size over the entire table");
9696
forceOpt = new Option("f", "force", false,
9797
"merge small tablets to large tablets, even if it goes over the given size");
98-
allOpt = new Option("", "all", false,
99-
"allow an entire table to be merged into one tablet without prompting"
98+
// Using the constructor does not allow for empty option
99+
Option.Builder builder = Option.builder().longOpt("all").hasArg(false)
100+
.desc("allow an entire table to be merged into one tablet without prompting"
100101
+ " the user for confirmation");
102+
allOpt = builder.build();
101103
o.addOption(OptUtil.startRowOpt());
102104
o.addOption(OptUtil.endRowOpt());
103105
o.addOption(OptUtil.tableOpt("table to be merged"));

shell/src/main/java/org/apache/accumulo/shell/commands/SetIterCommand.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ public int execute(final String fullCommand, final CommandLine cl, final Shell s
109109
}
110110

111111
// Try to get the name provided by the setiter command
112-
String name = cl.getOptionValue(nameOpt.getOpt(), null);
112+
String name = cl.getOptionValue(nameOpt.getOpt());
113113

114114
// Cannot continue if no name is provided
115115
if (name == null && configuredName == null) {

shell/src/test/java/org/apache/accumulo/shell/commands/SetIterCommandTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public void addColumnAgeOffFilter() throws Exception {
6969
EasyMock.expect(cli.hasOption("regex")).andReturn(false);
7070
EasyMock.expect(cli.hasOption("reqvis")).andReturn(false);
7171
EasyMock.expect(cli.hasOption("vers")).andReturn(false);
72-
EasyMock.expect(cli.getOptionValue("n", null)).andReturn(null);
72+
EasyMock.expect(cli.getOptionValue("n")).andReturn(null);
7373

7474
// Loading the class
7575
EasyMock.expect(shellState.getClassLoader(cli, shellState))

0 commit comments

Comments
 (0)