Getting error in command hdfs dfs -mkdir

0 votes

I have just started learning Hadoop & had setup my own VM. I am learning basic commands. One of the basic command is to create a directory ully.

I am trying to create a test directory in HDFS.

hdfs dfs -mkdir hdfs://localhost:9000/usr/hadoop/test

I am getting the following error message:

/usr/lib/hadoop/etc/hadoop/ line 2: ./ Permission denied

11/6/17 12:08:02 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable

mkdir: `hdfs://localhost:9000/usr/hadoop/test': No such file or directory

I am creating a directory but the error is saying that the directory is not there. I think this has something to do with the permissions. Can someone help me out?

Apr 15, 2018 in Big Data Hadoop by coldcode
• 2,050 points

1 answer to this question.

0 votes
You are getting this error because the parent directory which you are referring i.e. /usr/Hadoop doesn’t exist. So hdfs is not able to create this directory. You can go to localhost:9000 in your web browser to check this. You can use this command to create the parent as well as target directory.

hdfs dfs -mkdir -p hdfs://localhost:9000/usr/hadoop/test
answered Apr 15, 2018 by Shubham
• 13,450 points

Related Questions In Big Data Hadoop

0 votes
1 answer
0 votes
1 answer

Issue in hdfs dfs command

Hadoop has a special file system called ...READ MORE

answered Jan 7, 2019 in Big Data Hadoop by Omkar
• 69,030 points
0 votes
1 answer
+1 vote
1 answer

Hadoop Mapreduce word count Program

Firstly you need to understand the concept ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 10,950 points
+1 vote
11 answers

hadoop fs -put command?

put syntax: put <localSrc> <dest> copy syntax: copyF ...READ MORE

answered Dec 7, 2018 in Big Data Hadoop by Aditya
–1 vote
1 answer

Hadoop dfs -ls command?

In your case there is no difference ...READ MORE

answered Mar 16, 2018 in Big Data Hadoop by kurt_cobain
• 9,320 points
0 votes
1 answer
+1 vote
1 answer
0 votes
5 answers