diff --git a/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/HddsDatanodeService.java b/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/HddsDatanodeService.java index dbff549fa6..4ddfb2fe51 100644 --- a/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/HddsDatanodeService.java +++ b/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/HddsDatanodeService.java @@ -105,7 +105,7 @@ public HddsDatanodeService(Configuration conf) { @VisibleForTesting public static HddsDatanodeService createHddsDatanodeService( String[] args, Configuration conf) { - return createHddsDatanodeService(args, conf, true); + return createHddsDatanodeService(args, conf, false); } /** @@ -124,11 +124,9 @@ private static HddsDatanodeService createHddsDatanodeService( if (args.length == 0 && printBanner) { StringUtils .startupShutdownMessage(HddsDatanodeService.class, args, LOG); - return new HddsDatanodeService(conf); - } else { - new HddsDatanodeService().run(args); - return null; + } + return new HddsDatanodeService(conf); } public static void main(String[] args) {