Hello Huy,
Try adding the port as well and see if it helps :
hdfs://localhost:9000/data.(as
per your config)
And if you don't want to give the complete URI and do it by giving just the
directory Path add the following lines in your client to tell it that you
want to operate on HDFS and not on you
Ensure you also initialize the FileSystem object (fs) against the
right FS URI. It may be trying to resolve /data as a LocalFS path.
On Sat, Aug 3, 2013 at 7:08 AM, Huy Pham wrote:
> So I am trying to get the content of a HDFS dir. The instruction gives an
> example like this:
> FileStatus[] stat
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 wrote