hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Allen Wittenauer (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HADOOP-7696) Add a note regarding the debug-log stack trace printing done in Configuration class
Date Tue, 10 Mar 2015 02:33:38 GMT

     [ https://issues.apache.org/jira/browse/HADOOP-7696?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Allen Wittenauer updated HADOOP-7696:
-------------------------------------
    Affects Version/s:     (was: 0.24.0)
                       2.0.0-alpha

> 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: 2.0.0-alpha
>            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)

Mime
View raw message