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
             Fix For: 0.24.0


{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 is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to