hadoop-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From web service <wbs...@gmail.com>
Subject Re: Accessing hdfs from a program not run with bin/hadoop
Date Sun, 14 Nov 2010 05:18:31 GMT
Ok, I need to access file system appropriately.
This works.

hdfs = FileSystem.get(new URI(HDFS_PATH),conf);



On Sat, Nov 13, 2010 at 7:54 PM, web service <wbsrvc@gmail.com> wrote:

> I am running a program with the following code.
>
> [code]
> ............
>             conf.addResource(new
> Path("file:///home/mac/software/hadoop/hadoop-0.20.2/conf/core-site.xml"));
>             fs = FileSystem.get(conf);
>             fs.delete(new
> Path("hdfs://localhost:9000/user/mac/output/output-1"), true);
> ............
> [/code]
>
> but I get the following exception, not sure what else configuration I would
> want to add.
>
>
> [code]
> Exception --
> .......
> Wrong FS: hdfs://localhost:9000/user/mac/output/output-1, expected:
> file:///
> .......
>
> [/code]
>

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