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,950 points
965 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,450 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,320 points
206 views
0 votes
1 answer

Hadoop: java.io.IOException: File could only be replicated to 0 nodes instead of minReplication (=1)

Try this, first stop all the daemons, ...READ MORE

answered Nov 6, 2018 in Big Data Hadoop by Omkar
• 69,030 points
1,150 views
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
• 69,030 points
783 views
+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
5,879 views
+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
37,091 views
–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
2,196 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,450 points
1,434 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
• 57,640 points
429 views