hadoop-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shrijeet Paliwal <shrij...@rocketfuel.com>
Subject Loading conf file sitting in HDFS
Date Fri, 29 Oct 2010 19:18:14 GMT
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][shrijeet@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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message