Discussion:
newbie how to get url paths of files in HDFS
chaitanya krishna
2008-05-08 09:37:55 UTC
Permalink
Hi,

I want to get the "URL" paths of files that are stored in dfs. Is there
any way to get it?


Thank you
Peeyush Bishnoi
2008-05-08 10:34:30 UTC
Permalink
Hello Chaitanya ,

using getInputpaths() you can do this . See here

http://hadoop.apache.org/core/docs/current/api/org/apache/hadoop/mapred/JobConf.html#getInputPaths()

---
Peeyush
Post by chaitanya krishna
Hi,
I want to get the "URL" paths of files that are stored in dfs. Is there
any way to get it?
Thank you
Peeyush Bishnoi
2008-05-08 12:04:25 UTC
Permalink
I apologize that I misunderstood your question , do you want to get URL
through API or through web interface.

Thanks ,

---
Peeyush
Post by Peeyush Bishnoi
Hello Chaitanya ,
using getInputpaths() you can do this . See here
http://hadoop.apache.org/core/docs/current/api/org/apache/hadoop/mapred/JobConf.html#getInputPaths()
---
Peeyush
Post by chaitanya krishna
Hi,
I want to get the "URL" paths of files that are stored in dfs. Is there
any way to get it?
Thank you
Ted Dunning
2008-05-08 13:30:44 UTC
Permalink
Take the fully qualified HDFS path that looks like this:

hdfs://namenode-host-name:port/file-path

And transform it into this:

hdfs://namenode-host-name:web-interface-port/data/file-path

The web-interface-port is 50070 by default. This will allow you to read HDFS files via HTTP.


-----Original Message-----
From: Peeyush Bishnoi [mailto:peeyushb-ZXvpkYn067l8UrSeD/***@public.gmane.org]
Sent: Thu 5/8/2008 5:04 AM
To: core-user-7ArZoLwFLBtd/SJB6HiN2Ni2O/***@public.gmane.org
Subject: Re: newbie how to get url paths of files in HDFS

I apologize that I misunderstood your question , do you want to get URL
through API or through web interface.

Thanks ,

---
Peeyush
Post by Peeyush Bishnoi
Hello Chaitanya ,
using getInputpaths() you can do this . See here
http://hadoop.apache.org/core/docs/current/api/org/apache/hadoop/mapred/JobConf.html#getInputPaths()
---
Peeyush
Post by chaitanya krishna
Hi,
I want to get the "URL" paths of files that are stored in dfs. Is there
any way to get it?
Thank you
Doug Cutting
2008-05-08 16:35:51 UTC
Permalink
Post by Ted Dunning
hdfs://namenode-host-name:port/file-path
hdfs://namenode-host-name:web-interface-port/data/file-path
The web-interface-port is 50070 by default. This will allow you to read HDFS files via HTTP.
Also, starting in release 0.18.0, Java programs can use "hdfs:" URLs.
For example, one can create a URLClassLoader for a jar stored in HDFS.

Doug
Ted Dunning
2008-05-08 18:15:16 UTC
Permalink
That will be incredibly useful!
Post by Doug Cutting
Post by Ted Dunning
hdfs://namenode-host-name:port/file-path
hdfs://namenode-host-name:web-interface-port/data/file-path
The web-interface-port is 50070 by default. This will allow you to read HDFS
files via HTTP.
Also, starting in release 0.18.0, Java programs can use "hdfs:" URLs.
For example, one can create a URLClassLoader for a jar stored in HDFS.
Doug
Loading...