[
https://issues.apache.org/jira/browse/HADOOP-7696?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Allen Wittenauer updated HADOOP-7696:
-------------------------------------
Fix Version/s: (was: 0.24.0)
> Add a note regarding the debug-log stack trace printing done in Configuration
> class
> -----------------------------------------------------------------------------------
>
> Key: HADOOP-7696
> URL: https://issues.apache.org/jira/browse/HADOOP-7696
> Project: Hadoop Common
> Issue Type: Improvement
> Components: conf
> Affects Versions: 0.24.0
> Reporter: Harsh J
> Priority: Trivial
>
> {code}
> /** A new configuration where the behavior of reading from the default
> * resources can be turned off.
> *
> * If the parameter {@code loadDefaults} is false, the new instance
> * will not load resources from the default files.
> * @param loadDefaults specifies whether to load from the default files
> */
> public Configuration(boolean loadDefaults) {
> this.loadDefaults = loadDefaults;
> if (LOG.isDebugEnabled()) {
> LOG.debug(StringUtils.stringifyException(new IOException("config()")));
> }
> synchronized(Configuration.class) {
> REGISTRY.put(this, null);
> }
> this.storeResource = false;
> }
> {code}
> The LOG.debug line prints out an exceptionized-stacktrace, which seems to be
> confusing to some users/hackers who're reading sources, or are running hadoop
> in debug mode.
> Perhaps we can add a comment to explain why an exception is being logged (for
> stack trace), or handle printing a point stacktrace in a more elegant way.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)