HDFS-13727. Log full stack trace if DiskBalancer exits with an unhandled exception. Contributed by Gabor Bota.
Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/64e739e3 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/64e739e3 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/64e739e3 Branch: refs/heads/HDFS-12943 Commit: 64e739e344ac474046d4f4ecf0865dd92be13762 Parents: 8d3c068 Author: Anu Engineer <aengin...@apache.org> Authored: Fri Jul 27 06:11:56 2018 -0700 Committer: Anu Engineer <aengin...@apache.org> Committed: Fri Jul 27 06:11:56 2018 -0700 ---------------------------------------------------------------------- .../main/java/org/apache/hadoop/hdfs/tools/DiskBalancerCLI.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hadoop/blob/64e739e3/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DiskBalancerCLI.java ---------------------------------------------------------------------- diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DiskBalancerCLI.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DiskBalancerCLI.java index 00e6f04..34bd68b 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DiskBalancerCLI.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DiskBalancerCLI.java @@ -172,7 +172,9 @@ public class DiskBalancerCLI extends Configured implements Tool { 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); --------------------------------------------------------------------- To unsubscribe, e-mail: common-commits-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-commits-h...@hadoop.apache.org