hadoop-mapreduce-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Huy Pham <pha...@yahoo-inc.com>
Subject How to construct path to a HDFS dir in local host
Date Sat, 03 Aug 2013 01:38:04 GMT
So I am trying to get the content of a HDFS dir. The instruction gives an example like this:
FileStatus[] status = fs.listStatus(new Path("hdfs://jp.seka.com:9000/user/jeka/in"));
But now I need to apply this example to my local host, which has HDFS dir "/data". I tried
putting "/data" and "hdfs://localhost/data" but it still said "file not found" in the output.
The code I use can be found here: https://sites.google.com/site/hadoopandhive/home/how-to-read-all-files-in-a-directory-in-hdfs-using-hadoop-filesystem-api
Can someone explain how to put the right string for the path?
Thanks

Mime
View raw message