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 00e6f0499a..34bd68bc68 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 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);