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/hadoop-env.sh: line 2: ./hadoop-env.sh: 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
• 1,980 points
362 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
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
• 12,710 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 in Big Data Hadoop by Omkar
• 66,880 points
21 views
0 votes
1 answer
0 votes
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
• 9,310 points
1,817 views
0 votes
10 answers

hadoop fs -put command?

copy command can be used to copy files ...READ MORE

answered Dec 7, 2018 in Big Data Hadoop by Sujay
8,983 views
0 votes
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,260 points
646 views
0 votes
1 answer
+1 vote
1 answer
0 votes
5 answers

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.