Skip to content

Commit 851e93f

Browse files
committed
Merge branch '2.1' into 3.1
2 parents 84c916c + 7b746cd commit 851e93f

File tree

2 files changed

+12
-13
lines changed

2 files changed

+12
-13
lines changed

server/base/src/main/java/org/apache/accumulo/server/conf/CheckAccumuloProperties.java

+10-13
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,6 @@
3535
@AutoService(KeywordExecutable.class)
3636
public class CheckAccumuloProperties implements KeywordExecutable {
3737

38-
@SuppressFBWarnings(value = "PATH_TRAVERSAL_IN", justification = "intentional user-provided path")
39-
public static void main(String[] args) throws IOException {
40-
Preconditions.checkArgument(args.length == 1,
41-
"Expected 1 argument (the properties file path), got " + args.length);
42-
var hadoopConfig = new Configuration();
43-
var siteConfig = SiteConfiguration.fromFile(new File(args[0])).build();
44-
45-
VolumeManagerImpl.get(siteConfig, hadoopConfig);
46-
new ServerDirs(siteConfig, hadoopConfig);
47-
}
48-
4938
@Override
5039
public String keyword() {
5140
return "check-accumulo-properties";
@@ -59,8 +48,16 @@ public String description() {
5948
+ (new CheckServerConfig().keyword());
6049
}
6150

51+
@SuppressFBWarnings(value = "PATH_TRAVERSAL_IN", justification = "intentional user-provided path")
6252
@Override
63-
public void execute(String[] args) throws Exception {
64-
main(args);
53+
public void execute(String[] args) throws IOException {
54+
Preconditions.checkArgument(args.length == 1,
55+
"Expected 1 argument (the properties file path), got " + args.length);
56+
var hadoopConfig = new Configuration();
57+
var siteConfig = SiteConfiguration.fromFile(new File(args[0])).build();
58+
59+
VolumeManagerImpl.get(siteConfig, hadoopConfig);
60+
new ServerDirs(siteConfig, hadoopConfig);
6561
}
62+
6663
}

test/src/main/java/org/apache/accumulo/test/start/KeywordStartIT.java

+2
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
import org.apache.accumulo.miniclusterImpl.MiniClusterExecutable;
5353
import org.apache.accumulo.monitor.Monitor;
5454
import org.apache.accumulo.monitor.MonitorExecutable;
55+
import org.apache.accumulo.server.conf.CheckAccumuloProperties;
5556
import org.apache.accumulo.server.conf.CheckCompactionConfig;
5657
import org.apache.accumulo.server.conf.CheckServerConfig;
5758
import org.apache.accumulo.server.conf.util.ZooInfoViewer;
@@ -129,6 +130,7 @@ public void testExpectedClasses() {
129130
expectSet.put("admin", Admin.class);
130131
expectSet.put("check-compaction-config", CheckCompactionConfig.class);
131132
expectSet.put("check-server-config", CheckServerConfig.class);
133+
expectSet.put("check-accumulo-properties", CheckAccumuloProperties.class);
132134
expectSet.put("compaction-coordinator", CoordinatorExecutable.class);
133135
expectSet.put("compactor", CompactorExecutable.class);
134136
expectSet.put("create-empty", CreateEmpty.class);

0 commit comments

Comments
 (0)