Hadoop mapreduce error: apache.hadoop.mapred.FileAlreadyExistsException: Output directory

0 votes

I am trying to run this command: 

hadoop jar hadoop-examples-1.0.4.jar wordcount /home/hadoop/support/ /home/hadoop/support-new

I am getting this error:

04/12/18 06:02:10 INFO mapred.JobClient: Cleaning up the staging area    

hdfs://localhost:54310/home/hadoop/tmp/mapred/staging/hadoop/.staging/job_201304180554_0001      

04/12/18 06:02:10 ERROR security.UserGroupInformation: PriviledgedActionException       

as:hadoop cause:org.apache.hadoop.mapred.FileAlreadyExistsException: Output directory

/home/hadoop/support-new already exists

org.apache.hadoop.mapred.FileAlreadyExistsException: Output directory

/home/hadoop/support-new already exists at


org.apache.hadoop.mapreduce.lib.output.FileOutputFormat.checkOutputSpecs(FileOutputFormat.j

ava:137) at org.apache.hadoop.mapred.JobClient$2.run(JobClient.java:887) at

org.apache.hadoop.mapred.JobClient$2.run(JobClient.java:850) at

java.security.AccessController.doPrivileged(Native Method) at

javax.security.auth.Subject.doAs(Subject.java:416) at

org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1121) at  

org.apache.hadoop.mapred.JobClient.submitJobInternal(JobClient.java:850) at 

org.apache.hadoop.mapreduce.Job.submit(Job.java:500) at 

org.apache.hadoop.mapreduce.Job.waitForCompletion(Job.java:530) at

org.apache.hadoop.examples.WordCount.main(WordCount.java:67) at

sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at

sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at

sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:616) at

org.apache.hadoop.util.ProgramDriver$ProgramDescription.invoke(ProgramDriver.java:68)

at org.apache.hadoop.util.ProgramDriver.driver(ProgramDriver.java:139) at

org.apache.hadoop.examples.ExampleDriver.main(ExampleDriver.java:64) at

sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at

sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at

sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:616) at  

org.apache.hadoop.util.RunJar.main(RunJar.java:156) hadoop@master:~/hadoop$ bin/stop-

all.sh Warning: $HADOOP_HOME is deprecated. stopping jobtracker localhost: stopping  

tasktracker stopping namenode localhost: stopping datanode localhost: stopping

secondarynamenode    hadoop@master:~/hadoop$

How to solve this?

Dec 4, 2018 in Big Data Hadoop by digger
• 27,620 points
317 views

1 answer to this question.

0 votes
Seems like the output file already exists. Delete it and try again.
answered Dec 4, 2018 by Omkar
• 67,120 points

Related Questions In Big Data Hadoop

0 votes
0 answers

Error running hadoop mapreduce in Python using Hadoop Streaming

I was trying a sample mapredyce code ...READ MORE

Apr 2, 2018 in Big Data Hadoop by nitinrawat895
• 10,110 points
76 views
0 votes
1 answer

Getting error in Hadoop: Output file already exist

When you executed your code earlier, you ...READ MORE

answered Apr 19, 2018 in Big Data Hadoop by Shubham
• 13,190 points
1,106 views
0 votes
1 answer

Error in Hadoop Mapreduce

The file that you are referring here ...READ MORE

answered Apr 19, 2018 in Big Data Hadoop by Shubham
• 13,190 points
74 views
0 votes
1 answer

Hadoop Pipe: shared libraries, No such file or directory error

Add -rpath my.zip/lib to LDFLAGS_HDP. For compilation to work, you ...READ MORE

answered Aug 30, 2018 in Big Data Hadoop by Frankie
• 9,810 points
41 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,110 points
2,046 views
0 votes
1 answer

hadoop.mapred vs hadoop.mapreduce?

org.apache.hadoop.mapred is the Old API  org.apache.hadoop.mapreduce is the ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 10,110 points
196 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
10,472 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,240 points
764 views
0 votes
1 answer

PIG - Found interface org.apache.hadoop.mapreduce.JobContext, but class was expected

Yes, it is a compatibility issue. in Hadoop ...READ MORE

answered Oct 10, 2018 in Big Data Hadoop by Omkar
• 67,120 points
57 views
0 votes
1 answer

Hadoop Mapreduce: Error: Could not find or load main class com.sun.tools.javac.Main

You have to add HADOOP_CLASSPATH environment parameter: export ...READ MORE

answered Oct 30, 2018 in Big Data Hadoop by Omkar
• 67,120 points
258 views