I do it the old fashioned way:
(w, r) = os.popen2("%s/bin/hadoop dfs -cat %s" % (hadoop_home.rstrip('/'),
filename))
-----Original Message-----
From: Pete Wyckoff [mailto:[EMAIL PROTECTED]
Sent: Thu 2/21/2008 4:08 PM
To: [email protected]
Subject: Re: Python access to HDFS
We're profiling and tuning read performance for fuse dfs and have writes
implemented, but I haven 't been able to test it even as I haven't tried
0.16 yet - It requires the ability to create the file, close it and then
re-open it to start writing - which can't be done till 16.
--pete
On 2/21/08 3:50 PM, "Steve Sapovits" <[EMAIL PROTECTED]> wrote:
> Jeff Hammerbacher wrote:
>
>> maybe the dfs could expose a thrift interface in future releases?
>
> ThruDB exposes Lucene via Thrift but not the underlying HDFS. I just
> need HDFS access in Python for now.
>
>> you could also use the FUSE module to mount the dfs and just write to it
>> like any other filesystem...
>
> Good point. I'll check that avenue. Would FUSE add much overhead for
> writing lots of data? I see a Python binding for it.