hmm ... I tried a small test program, if I put log4j configuration in the
classpath and turn on debug level, I am actually seeing the exception
thrown. The seemingly silly issue I had have been bugging me for a while.
DEBUG hadoop.conf.Configuration - java.io.IOException: config()
at org.apache.hadoop.conf.Configuration.<init>(Configuration.java:226)
at org.apache.hadoop.conf.Configuration.<init>(Configuration.java:213)
On Wed, Sep 28, 2011 at 8:50 PM, Uma Maheswara Rao G 72686 <
[email protected]> wrote:
> Hello Ruby,
>
> It is just logging the trace of configuration object invocations.
> It will not throw exception.
>
> Regards,
> Uma
>
>
> ----- Original Message -----
> From: Ruby Stevenson <[email protected]>
> Date: Thursday, September 29, 2011 6:15 am
> Subject: The configuration loading behavior
> To: [email protected]
>
> > All -
> >
> > Can someone please help me to understand this
> > (org.apache.hadoop.conf.Configuration, 20.204).
> >
> > The following code reads like an exception will be thrown if debug
> > is on, no
> > matter what, why?
> >
> >
> > /** 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;
> > }
> >
> > Thanks
> >
> > Ruby
> >
>