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
