Tom White's book "Hadoop: The Definitive Guide" has a neat little
section about this in Chapter 3. Look at the FsUrlStreamHandlerFactory
class 
(http://hadoop.apache.org/common/docs/r0.20.2/api/org/apache/hadoop/fs/FsUrlStreamHandlerFactory.html)

Once registered into Java's net.URL, you should be able to use most
regular Java classes as long as you provide "hdfs" as the scheme (and
that the FileSystem instance knows what to use for it).

2011/5/9 ltomuno <ltom...@163.com>:
> using java
> new File("/tmp/common")
> but
> /tmp/common is a HDFS file
> how to implement this feature?
> thanks
>
>
>



-- 
Harsh J

Reply via email to