Hello All,
I am trying to load a conf file located in hdfs.
I was hoping following would work:

Path apath = new Path(conf.get("fs.default.name"),
"/home/shrijeet/blah.xml");
conf.addResource(apath);

But I get following exception,

Exception in thread "main" java.lang.RuntimeException:
hdfs://localhost:8020/home/shrijeet/blah.xml not found
        at
org.apache.hadoop.conf.Configuration.loadResource(Configuration.java:1297)
        at
org.apache.hadoop.conf.Configuration.loadResources(Configuration.java:1227)


File does exist however,

[12:20][shrij...@shrijeet-desktop]~$ hadoop dfs -ls
hdfs://localhost:8020/home/shrijeet/blah.xml
Found 1 items
-rw-r--r--   1 shrijeet shrijeet        488 2010-10-29 12:16
/home/shrijeet/blah.xml

Thoughts?

-Shrijeet

Reply via email to