virajjasani commented on a change in pull request #3732:
URL: https://github.com/apache/hadoop/pull/3732#discussion_r758084008



##########
File path: 
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/diskbalancer/command/QueryCommand.java
##########
@@ -84,7 +84,7 @@ public void execute(CommandLine cmd) throws Exception {
         System.out.printf("%s", workStatus.currentStateString());
       }
     } catch (DiskBalancerException ex) {
-      LOG.error("Query plan failed. ex: {}", ex);
+      LOG.error("Query plan failed. ex: {}", ex.getMessage());

Review comment:
       In general, it would depend on how useful the message is. I believe if 
we are re-throwing Exceptions (like this case), and we are also logging the 
error message at ERROR level, it's good to print the entire stracktrace for 
better debugging. Sounds good?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to