[ 
https://issues.apache.org/jira/browse/HADOOP-16181?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16791796#comment-16791796
 ] 

Steve Loughran commented on HADOOP-16181:
-----------------------------------------

I'm imagining something like

{code}
} catch (e) {
 logger.warn("in shutdown {}", e.toString())
 logger.debug("in shutdown ", e)
 throw e;
}
{code}

that way, you only get a single line of reporting, but the stack trace is 
entirely optional. 

that way, if the calling code hasn't done the rigorousness of handling this 
stuff, there's enough of a trace and ability to escalate that you can start to 
see what went wrong without changing the code, just log4j

> 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

Reply via email to