|
|
-
Configuration object not loading parameters in unit testsJay Vyas 2013-01-16, 18:05
Hi guys:
I'm trying load some cluster parameters in a unit test, which uses a custom filesystem. However, my configuration object doesnt seem to be loading: For example: conf.get("customparameter") (where "customparameter" is in conf/core-site.xml) is returning null. To investigate: I tried to print the Configuration object. Oddly, it showed 4 paths, even though none of these files exist locally: Configuration : Configuration: core-default.xml, core-site.xml, mapred-default.xml, mapred-site.xml, conf/core-site.xml How can I force my Configuration object to preferentially load conf/core-site.xml ? I've added it using Configuration.addDefaultResource(...), but it seems that the parameters are not getting loaded into the runtime Configuration object. Ultimately, the bug I have is that the default filesystem is being created, rather than my custom filesystem. File system: org.apache.hadoop.fs.LocalFileSystem@4ce2cb55 -- Jay Vyas http://jayunit100.blogspot.com |