diff --git a/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/freon/RandomKeyGenerator.java b/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/freon/RandomKeyGenerator.java index d85b829e43..5871b49669 100644 --- a/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/freon/RandomKeyGenerator.java +++ b/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/freon/RandomKeyGenerator.java @@ -270,23 +270,20 @@ public Void call() throws Exception { processor.shutdown(); processor.awaitTermination(Integer.MAX_VALUE, TimeUnit.MILLISECONDS); completed = true; - progressbar.shutdown(); - if (validateWrites) { + if (exception) { + progressbar.terminate(); + } else { + progressbar.shutdown(); + } + + if (validator != null) { validator.join(); } ozoneClient.close(); return null; } - private void parseOptions(CommandLine cmdLine) { - if (keySize < 1024) { - throw new IllegalArgumentException( - "keySize can not be less than 1024 bytes"); - } - - } - /** * Adds ShutdownHook to print statistics. */