[ https://issues.apache.org/jira/browse/HADOOP-16181?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16791777#comment-16791777 ]
David Mollitor commented on HADOOP-16181: ----------------------------------------- {quote} All of the above examples are equally wrong. This is one of the most annoying error-handling antipatterns. Either log the exception, or throw it, but never do both. Logging and throwing results in multiple log messages for a single problem in the code, and makes life hell for the support engineer who is trying to dig through the logs. - https://community.oracle.com/docs/DOC-983543#logAndThrow {quote} The risk is that we getting multiple logging in multiple places for the same error. There needs to be some responsibility on the caller. > HadoopExecutors shutdown Cleanup > -------------------------------- > > Key: HADOOP-16181 > URL: https://issues.apache.org/jira/browse/HADOOP-16181 > Project: Hadoop Common > Issue Type: Improvement > Components: util > Affects Versions: 3.2.0 > Reporter: David Mollitor > Assignee: David Mollitor > Priority: Minor > Attachments: HADOOP-16181.1.patch > > > # Add method description > # Add additional logging > # Do not log-and-throw Exception. Anti-pattern. -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-issues-h...@hadoop.apache.org