Hadoop giving java.io.IOException, in mkdir Java code.

0 votes
I placed my data set in the hdfs directory and now I am trying to execute a MapReduce code over the data. But while executing the MapReduce task, I am getting the error saying

Exception in thread "main" java.io.IOException: Mkdirs failed to create /tmp/output

    at org.apache.hadoop.util.RunJar.ensureDirectory(RunJar.java:106)

    at org.apache.hadoop.util.RunJar.main(RunJar.java:150)

But when I use -ls command I see the file already exists. Someone, please help me out?
May 3, 2018 in Big Data Hadoop by nitinrawat895
• 10,730 points
483 views

1 answer to this question.

0 votes
I am not sure about the issue. But generally, tmp folder in Hadoop doesn’t have permissions of all the users to create or execute. Kindly check the permission and either try to move the output folder to another directory or give the tmp directory the permission to create directory inside it.
answered May 3, 2018 by Shubham
• 13,310 points

Related Questions In Big Data Hadoop

0 votes
1 answer

Why Java Code in Hadoop uses own Data Types instead of basic Data types?

Hadoop provides us Writable interface based data ...READ MORE

answered Apr 15, 2018 in Big Data Hadoop by kurt_cobain
• 9,260 points
102 views
0 votes
1 answer
0 votes
1 answer

Hadoop: namenode -format error "java.io.IOException"

Run the command as sudo or add the ...READ MORE

answered Nov 26, 2018 in Big Data Hadoop by Omkar
• 67,660 points
233 views
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
• 10,730 points
3,358 views
0 votes
10 answers

hadoop fs -put command?

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

answered Dec 7, 2018 in Big Data Hadoop by Aditya
16,649 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
1,216 views
0 votes
1 answer
0 votes
1 answer

Moving files in Hadoop using the Java API?

I would recommend you to use FileSystem.rename(). ...READ MORE

answered Apr 15, 2018 in Big Data Hadoop by Shubham
• 13,310 points
921 views
+1 vote
2 answers

How to authenticate username & password while using Connector for Cloudera Hadoop in Tableau?

Hadoop server installed was kerberos enabled server. ...READ MORE

answered Aug 21, 2018 in Big Data Hadoop by Priyaj
• 56,920 points
224 views