35
35
@ AutoService (KeywordExecutable .class )
36
36
public class CheckAccumuloProperties implements KeywordExecutable {
37
37
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
-
49
38
@ Override
50
39
public String keyword () {
51
40
return "check-accumulo-properties" ;
@@ -59,8 +48,16 @@ public String description() {
59
48
+ (new CheckServerConfig ().keyword ());
60
49
}
61
50
51
+ @ SuppressFBWarnings (value = "PATH_TRAVERSAL_IN" , justification = "intentional user-provided path" )
62
52
@ 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 );
65
61
}
62
+
66
63
}
0 commit comments