hadoop-common-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jay Vyas <jayunit...@gmail.com>
Subject Configuration object not loading parameters in unit tests
Date Wed, 16 Jan 2013 18:05:52 GMT
Hi guys:

I'm trying load some cluster parameters in a unit test, which uses a custom

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

View raw message