user1471980
user1471980

Reputation: 10626

how do you check the directory in dfs

I have created a directory in dfs called /foodir to test, as below:

hadoop dfs -mkdir /foodir 

Can someone tell me where is this /foodir saved? How can I check the path? I need to make sure, it is not saved under localfile system /tmp because, everytime server is rebooted /tmp is deleted.

Any ideas how to check the /foodir path in the server file system?

Upvotes: 0

Views: 121

Answers (1)

OneCricketeer
OneCricketeer

Reputation: 191725

This depends how you setup your core-site.xml and hdfs-site.xml files...

If fs.defaultFS is not set to a file:// path (the default), then your local /tmp is not touched

If your datanode and namenode data directories are not set to your local /tmp (also the default), then nothing is stored there either

You can explicitly make a HDFS path via

hdfs dfs -mkdir hdfs://namenode.fqdn:port/foodir

Otherwise, just run ls /tmp and check if there's files there you made

Upvotes: 1

Related Questions