HDFS-12406. dfsadmin command prints "Exception encountered" even if there is no exception, when debug is enabled. Contributed by Nandakumar.

This commit is contained in:
Chen Liang 2017-09-11 14:48:07 -07:00
parent 088a18b44d
commit 738c2a9682
1 changed files with 1 additions and 1 deletions

View File

@ -2244,7 +2244,7 @@ public class DFSAdmin extends FsShell {
System.err.println(cmd.substring(1) + ": " System.err.println(cmd.substring(1) + ": "
+ e.getLocalizedMessage()); + e.getLocalizedMessage());
} }
if (LOG.isDebugEnabled()) { if (LOG.isDebugEnabled() && debugException != null) {
LOG.debug("Exception encountered:", debugException); LOG.debug("Exception encountered:", debugException);
} }
return exitCode; return exitCode;