Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Threaded View
MapReduce >> mail # user >> Re: How to construct path to a HDFS dir in local host


Copy link to this message
-
Re: How to construct path to a HDFS dir in local host
I think you need to have a user folder (with whatever user you are running
hadoop) and put your files there. In fact that folder should be already
created there. The hdfsr data dir property is for setting the path to the
data files.

Regards,
Shahab
On Fri, Aug 2, 2013 at 9:38 PM, Huy Pham <[EMAIL PROTECTED]> wrote:

>  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
>
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB