The Hadoop file API allows you to open a file based on URL

        Path file = new
Path("hdfs://hadoop00:54313/user/hadoop/conflated.20081016/part-00009");
        JobConf job = new JobConf(new Configuration(),
ReadFileHadoop.class);
            
        job.setJobName("test");

        FileSystem fs = file.getFileSystem(job);
        FSDataInputStream fileIn = fs.open(file);



-----Original Message-----
From: Neal Lee (RDLV) [mailto:[EMAIL PROTECTED] 
Sent: Friday, October 31, 2008 4:00
To: [email protected]
Cc: Neal Lee (RDLV)
Subject: Browse HDFS file in URL

Hi All,

 

I'm wondering that can I browse a HDFS file in URL (ex.
http://host/test.jpeg) so that I can show this file on my webapp
directly.

 

Thanks,

Neal

This correspondence is from Cyberlink Corp. and is intended only for use
by the recipient named herein, 
and may contain privileged, proprietary and/or confidential information,
and is intended only to be seen 
and used by named addressee(s). You are notified that any discussion,
dissemination, distribution or copying of 
this correspondence and any attachments, is strictly prohibited, unless
otherwise authorized or consented 
to in writing by the sender. If you have received this correspondence in
error, please notify the sender immediately, 
and please permanently delete the original and any copies of it and any
attachment and destroy any
related printouts without reading or copying them.

Reply via email to