HDFS-13727. Log full stack trace if DiskBalancer exits with an unhandled exception.

Contributed by Gabor Bota.
This commit is contained in:
Anu Engineer 2018-07-27 06:11:56 -07:00
parent 8d3c068e59
commit 64e739e344

View File

@ -172,7 +172,9 @@ public static void main(String[] argv) throws Exception {
try {
res = ToolRunner.run(shell, argv);
} catch (Exception ex) {
LOG.error(ex.toString());
String msg = String.format("Exception thrown while running %s.",
DiskBalancerCLI.class.getSimpleName());
LOG.error(msg, ex);
res = 1;
}
System.exit(res);