hadoop-common-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug Cutting <cutt...@apache.org>
Subject Re: Configuration.java and bad constructor
Date Wed, 18 Jul 2007 16:40:09 GMT
Briggs wrote:
> Starting at line 90 of org.apache.hadoop.conf.Configuration.java
> 
>  /** A new configuration. */
>  public Configuration() {
>    if (LOG.isDebugEnabled()) {
>      LOG.debug(StringUtils.stringifyException(new 
> IOException("config()")));
>    }
>    defaultResources.add("hadoop-default.xml");
>    finalResources.add("hadoop-site.xml");
>  }
> 
> Now, why would anyone create an IOException and log it like this?  I
> was wondering why all these darned exceptions were in my logs.

Since it is only printed when LOG.isDebugEnabled(), it is clearly 
debugging code.  Are you intentionally displaying debug-level messages? 
  If so, you'll probably see a lot of stuff you don't care about.

It looks like someone was interested in seeing where configurations were 
constructed, and so printing a stack trace whenever one is constructed. 
  This code could probably be removed without causing any harm.

Doug

Mime
View raw message