|
|
+
Tom Melendez 2013-01-17, 00:45
+
Jay Vyas 2013-01-17, 05:01
+
Julien Muller 2013-01-17, 15:36
+
Vinod Kumar Vavilapalli 2013-01-29, 01:58
-
Re: core-site.xml file is being ignored by new Configuration()Colin McCabe 2013-01-28, 22:47
The configuration XML files are loaded from your CLASSPATH.
If you want to know more about what configuration you're picking up, you can use the "./bin/hdfs getconf" command. cheers, Colin On Thu, Jan 17, 2013 at 7:49 AM, Jay Vyas <[EMAIL PROTECTED]> wrote: > I agree, but the fact that the configuration is doing the loading, means > (i think) that it should (at least) do some error handling for that > loading, correct? > > > On Thu, Jan 17, 2013 at 10:36 AM, Julien Muller <[EMAIL PROTECTED]>wrote: > >> imo, as long as the javadoc is clear enough, any behavior is ok. >> What's written in current version is: >> name - resource to be added, the classpath is examined for a file with >> that name. >> >> So nothing in this javadoc lets you believe that the file exists or will >> be loaded. Also you could make sure your file is in the classpath (which is >> the case for me). >> >> Julien >> >> 2013/1/17 Jay Vyas <[EMAIL PROTECTED]> >> >>> Good catch with that string.length() - you're right, that was a silly >>> mistake. --- sorry - im not sure what i was thinking. it was a late night >>> :) >>> >>> In any case, the same code with file.exists() fails... i've validated >>> that path many ways. >>> >>> On a broader note: Shouldn't the Configuration class just throw a >>> RuntimeException if the file isn't available? Its very strange to add >>> all these default resources, which may or may not exist, to a class - then >>> having to introspect on the class at runtime to see if they actually got >>> loaded. >>> >>> >>> On Thu, Jan 17, 2013 at 5:06 AM, Julien Muller <[EMAIL PROTECTED]>wrote: >>> >>>> conf.addResource(file.getAbsoluteFile().toURI().toURL()); >>>> >>> >>> >>> >>> >>> -- >>> Jay Vyas >>> http://jayunit100.blogspot.com >>> >> >> > > > -- > Jay Vyas > http://jayunit100.blogspot.com > |