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
1 changed files with 3 additions and 1 deletions

View File

@ -172,7 +172,9 @@ public class DiskBalancerCLI extends Configured implements Tool {
try { try {
res = ToolRunner.run(shell, argv); res = ToolRunner.run(shell, argv);
} catch (Exception ex) { } 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; res = 1;
} }
System.exit(res); System.exit(res);