You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-user@hadoop.apache.org by Arko Provo Mukherjee <ar...@gmail.com> on 2011/10/10 23:54:01 UTC

FileSystem API for 0.19

Hello,

I am using the FS API to write into files in HDFS.

FileSystem fs = FileSystem.get(jobconf);

Path pt = new Path(some_string);

BufferedWriter wr = new BufferedWriter(new OutputStreamWriter(fs.create(pt,
true)));

C_init.write("Hello!");


This works wells in Hadoop 0.20.203.0 but doesn't work for 0.19.

Please help!

Many thanks in advance!

Warm regards

Arko

Re: FileSystem API for 0.19

Posted by Arko Provo Mukherjee <ar...@gmail.com>.
Hi,

Yeah, I fixed the problem, I compiled against the incorrect jars.

The reason I use 0.19 is that the cloud I have access to is still being maintained at 0.19 :(

Thanks much!
Warm regards
Arko

On Oct 10, 2011, at 9:34 PM, Harsh J <ha...@cloudera.com> wrote:

> Arko,
> 
> It helps if we know what "doesn't work" means, and if we can see
> stacktraces [0], and what your steps were for execution that lead to
> it 'not working'.
> 
> My best guess in the dark would be that you are not using the right
> client jars when communicating with either of the HDFS servers. Due to
> incompatible changes to the HDFS protocols used within, inter-version
> talk between 0.19 and 0.20 isn't possible. You need a separate client
> prepared for each.
> 
> Besides, why are you interested in using 0.19, as it is now unmaintained?
> 
> [0] - http://imgur.com/jacoj [J/K]
> 
> On Tue, Oct 11, 2011 at 3:24 AM, Arko Provo Mukherjee
> <ar...@gmail.com> wrote:
>> Hello,
>> I am using the FS API to write into files in HDFS.
>> 
>> FileSystem fs = FileSystem.get(jobconf);
>> 
>> Path pt = new Path(some_string);
>> 
>> BufferedWriter wr = new BufferedWriter(new
>> OutputStreamWriter(fs.create(pt,true)));
>> 
>> C_init.write("Hello!");
>> 
>> This works wells in Hadoop 0.20.203.0 but doesn't work for 0.19.
>> 
>> Please help!
>> 
>> Many thanks in advance!
>> 
>> Warm regards
>> 
>> Arko
> 
> 
> 
> -- 
> Harsh J

Re: FileSystem API for 0.19

Posted by Harsh J <ha...@cloudera.com>.
Arko,

It helps if we know what "doesn't work" means, and if we can see
stacktraces [0], and what your steps were for execution that lead to
it 'not working'.

My best guess in the dark would be that you are not using the right
client jars when communicating with either of the HDFS servers. Due to
incompatible changes to the HDFS protocols used within, inter-version
talk between 0.19 and 0.20 isn't possible. You need a separate client
prepared for each.

Besides, why are you interested in using 0.19, as it is now unmaintained?

[0] - http://imgur.com/jacoj [J/K]

On Tue, Oct 11, 2011 at 3:24 AM, Arko Provo Mukherjee
<ar...@gmail.com> wrote:
> Hello,
> I am using the FS API to write into files in HDFS.
>
> FileSystem fs = FileSystem.get(jobconf);
>
> Path pt = new Path(some_string);
>
> BufferedWriter wr = new BufferedWriter(new
> OutputStreamWriter(fs.create(pt,true)));
>
> C_init.write("Hello!");
>
> This works wells in Hadoop 0.20.203.0 but doesn't work for 0.19.
>
> Please help!
>
> Many thanks in advance!
>
> Warm regards
>
> Arko



-- 
Harsh J