File tree Expand file tree Collapse file tree 1 file changed +11
-10
lines changed
hbase-server/src/main/java/org/apache/hadoop/hbase/util Expand file tree Collapse file tree 1 file changed +11
-10
lines changed Original file line number Diff line number Diff line change @@ -152,17 +152,18 @@ public static void main(String[] args) throws Exception {
152152
153153 Configuration conf = new Configuration ();
154154 Path path = new Path (args [0 ]);
155- FileSystem fs = path .getFileSystem (conf );
156- if (fs .exists (path )) {
157- System .err .println ("The specified path exists, aborting!" );
158- System .exit (1 );
159- }
155+ try ( FileSystem fs = path .getFileSystem (conf )) {
156+ if (fs .exists (path )) {
157+ System .err .println ("The specified path exists, aborting!" );
158+ System .exit (1 );
159+ }
160160
161- try {
162- doSmokeTest (fs , path , args [1 ]);
163- } finally {
164- fs .delete (path , false );
161+ try {
162+ doSmokeTest (fs , path , args [1 ]);
163+ } finally {
164+ fs .delete (path , false );
165+ }
166+ System .out .println ("SUCCESS" );
165167 }
166- System .out .println ("SUCCESS" );
167168 }
168169}
You can’t perform that action at this time.
0 commit comments