I’m new to hadoop and I’m trying to create a directory in hdfs
called input_dir
. I have set up my vm, installed and started hadoop
successfully.
This is the command that I run:
hdfs dfs -mkdir input_dir
And it keeps returning this error message:
mkdir: 'hdfs://hongdao-master:9000/user/hadoophongdao': No such file or directory
Why is it giving this error?
Bloom is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
3
You need to first hadoop fs mkdir -p /user/hadoophongdao && hadoop fs -chmod -R 760 /user/hadoophongdao
Your user folder is used as the default parent folder without providing an absolute path, and it’s not created by default for any user of HDFS.
Otherwise, you could use /tmp/input_dir
2