You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mapreduce-dev@hadoop.apache.org by Nada Saif <na...@gmail.com> on 2014/12/10 23:13:17 UTC
wordcount program error!
Hi ,
I'm confused with mapreduce wordcount , I get this error when run the
program
I don't know what's wrong,I'm sure about the code ,because it works before
well.
and I notice there is an exception about "file already exist ", the folder
is empty ,and I even tried another output folder!
Can you please help!
Thanks
14/12/11 02:25:25 WARN mapred.JobClient: Use GenericOptionsParser for
parsing the arguments. Applications should implement Tool for the same.
14/12/11 02:25:26 INFO mapred.JobClient: Cleaning up the staging area
hdfs://localhost:8020/var/lib/hadoop-hdfs/cache/mapred/
mapred/staging/training/.staging/job_201412110028_0010
14/12/11 02:25:26 ERROR security.UserGroupInformation:
PriviledgedActionException as:training (auth:SIMPLE)
cause:org.apache.hadoop.mapred.FileAlreadyExistsException: Output directory
hdfs://localhost:8020/user/training/wordcountout already exists
Exception in thread "main" org.apache.hadoop.mapred.FileAlreadyExistsException:
Output directory hdfs://localhost:8020/user/training/wordcountout already
exists
at org.apache.hadoop.mapred.FileOutputFormat.checkOutputSpecs(
FileOutputFormat.java:117)
at org.apache.hadoop.mapred.JobClient$2.run(JobClient.java:986)
at org.apache.hadoop.mapred.JobClient$2.run(JobClient.java:945)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:415)
at org.apache.hadoop.security.UserGroupInformation.doAs(
UserGroupInformation.java:1408)
at org.apache.hadoop.mapred.JobClient.submitJobInternal(
JobClient.java:945)
at org.apache.hadoop.mapred.JobClient.submitJob(JobClient.java:919)
at org.apache.hadoop.mapred.JobClient.runJob(JobClient.java:1368)
at wordcount1.WordCount.run(WordCount.java:45)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:84)
at wordcount1.WordCount.main(WordCount.java:51)
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:606)
at org.apache.hadoop.util.RunJar.main(RunJar.java:208)
Re: wordcount program error!
Posted by Nada Saif <na...@gmail.com>.
Thanks a lot Sandeep :)
Bests,
Nada
On Thu, Dec 11, 2014 at 11:48 AM, sandeep paul <pa...@gmail.com>
wrote:
> please try deleting the folder
> "hdfs://localhost:8020/user/training/wordcountout ". and run again
>
> mapreduce program wont start if output directory pre-exist ,even if it is
> empty .
>
>
> thanks
> Sandeep paul
>
> On Thu, Dec 11, 2014 at 3:43 AM, Nada Saif <na...@gmail.com> wrote:
>
> > Hi ,
> >
> > I'm confused with mapreduce wordcount , I get this error when run the
> > program
> >
> > I don't know what's wrong,I'm sure about the code ,because it works
> before
> > well.
> > and I notice there is an exception about "file already exist ", the
> folder
> > is empty ,and I even tried another output folder!
> >
> > Can you please help!
> >
> > Thanks
> >
> >
> > 14/12/11 02:25:25 WARN mapred.JobClient: Use GenericOptionsParser for
> > parsing the arguments. Applications should implement Tool for the same.
> > 14/12/11 02:25:26 INFO mapred.JobClient: Cleaning up the staging area
> > hdfs://localhost:8020/var/lib/hadoop-hdfs/cache/mapred/
> > mapred/staging/training/.staging/job_201412110028_0010
> > 14/12/11 02:25:26 ERROR security.UserGroupInformation:
> > PriviledgedActionException as:training (auth:SIMPLE)
> > cause:org.apache.hadoop.mapred.FileAlreadyExistsException: Output
> directory
> > hdfs://localhost:8020/user/training/wordcountout already exists
> > Exception in thread "main"
> > org.apache.hadoop.mapred.FileAlreadyExistsException:
> > Output directory hdfs://localhost:8020/user/training/wordcountout already
> > exists
> > at org.apache.hadoop.mapred.FileOutputFormat.checkOutputSpecs(
> > FileOutputFormat.java:117)
> > at org.apache.hadoop.mapred.JobClient$2.run(JobClient.java:986)
> > at org.apache.hadoop.mapred.JobClient$2.run(JobClient.java:945)
> > at java.security.AccessController.doPrivileged(Native Method)
> > at javax.security.auth.Subject.doAs(Subject.java:415)
> > at org.apache.hadoop.security.UserGroupInformation.doAs(
> > UserGroupInformation.java:1408)
> > at org.apache.hadoop.mapred.JobClient.submitJobInternal(
> > JobClient.java:945)
> > at org.apache.hadoop.mapred.JobClient.submitJob(JobClient.java:919)
> > at org.apache.hadoop.mapred.JobClient.runJob(JobClient.java:1368)
> > at wordcount1.WordCount.run(WordCount.java:45)
> > at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
> > at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:84)
> > at wordcount1.WordCount.main(WordCount.java:51)
> > 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:606)
> > at org.apache.hadoop.util.RunJar.main(RunJar.java:208)
> >
>
Re: wordcount program error!
Posted by sandeep paul <pa...@gmail.com>.
please try deleting the folder
"hdfs://localhost:8020/user/training/wordcountout ". and run again
mapreduce program wont start if output directory pre-exist ,even if it is
empty .
thanks
Sandeep paul
On Thu, Dec 11, 2014 at 3:43 AM, Nada Saif <na...@gmail.com> wrote:
> Hi ,
>
> I'm confused with mapreduce wordcount , I get this error when run the
> program
>
> I don't know what's wrong,I'm sure about the code ,because it works before
> well.
> and I notice there is an exception about "file already exist ", the folder
> is empty ,and I even tried another output folder!
>
> Can you please help!
>
> Thanks
>
>
> 14/12/11 02:25:25 WARN mapred.JobClient: Use GenericOptionsParser for
> parsing the arguments. Applications should implement Tool for the same.
> 14/12/11 02:25:26 INFO mapred.JobClient: Cleaning up the staging area
> hdfs://localhost:8020/var/lib/hadoop-hdfs/cache/mapred/
> mapred/staging/training/.staging/job_201412110028_0010
> 14/12/11 02:25:26 ERROR security.UserGroupInformation:
> PriviledgedActionException as:training (auth:SIMPLE)
> cause:org.apache.hadoop.mapred.FileAlreadyExistsException: Output directory
> hdfs://localhost:8020/user/training/wordcountout already exists
> Exception in thread "main"
> org.apache.hadoop.mapred.FileAlreadyExistsException:
> Output directory hdfs://localhost:8020/user/training/wordcountout already
> exists
> at org.apache.hadoop.mapred.FileOutputFormat.checkOutputSpecs(
> FileOutputFormat.java:117)
> at org.apache.hadoop.mapred.JobClient$2.run(JobClient.java:986)
> at org.apache.hadoop.mapred.JobClient$2.run(JobClient.java:945)
> at java.security.AccessController.doPrivileged(Native Method)
> at javax.security.auth.Subject.doAs(Subject.java:415)
> at org.apache.hadoop.security.UserGroupInformation.doAs(
> UserGroupInformation.java:1408)
> at org.apache.hadoop.mapred.JobClient.submitJobInternal(
> JobClient.java:945)
> at org.apache.hadoop.mapred.JobClient.submitJob(JobClient.java:919)
> at org.apache.hadoop.mapred.JobClient.runJob(JobClient.java:1368)
> at wordcount1.WordCount.run(WordCount.java:45)
> at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
> at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:84)
> at wordcount1.WordCount.main(WordCount.java:51)
> 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:606)
> at org.apache.hadoop.util.RunJar.main(RunJar.java:208)
>
Re: wordcount program error!
Posted by 전수현 <su...@gmail.com>.
hadoop hdfs did not use same directory even empty folder.
You have to remove folder and retry.
Or you can check the direcotory in code like this.
Configuration config = new Configuration();
FileSystem hdfs = FileSystem.get(config);
Path path = new Path(fileName);
boolean exist = hdfs.exists(path);
2014년 12월 11일 목요일, Nada Saif<na...@gmail.com>님이 작성한 메시지:
> Hi Tsuyoshi,
>
> I doubled check ,the wordcoutout folder is empty!?
>
> Regards
>
> On Thu, Dec 11, 2014 at 12:20 AM, Tsuyoshi OZAWA <ozawa.tsuyoshi@gmail.com
> <javascript:;>>
> wrote:
>
> > Hi Nada,
> >
> > Please check the stack trace:
> > FileAlreadyExistsException:
> > Output directory hdfs://localhost:8020/user/training/wordcountout already
> > exists
> >
> > The output directory you passed to the program already exists. Please
> > check it.
> >
> > Thanks,
> > - Tsuyoshi
> >
> > On Thu, Dec 11, 2014 at 7:13 AM, Nada Saif <nada.saif7@gmail.com
> <javascript:;>> wrote:
> > > Hi ,
> > >
> > > I'm confused with mapreduce wordcount , I get this error when run the
> > > program
> > >
> > > I don't know what's wrong,I'm sure about the code ,because it works
> > before
> > > well.
> > > and I notice there is an exception about "file already exist ", the
> > folder
> > > is empty ,and I even tried another output folder!
> > >
> > > Can you please help!
> > >
> > > Thanks
> > >
> > >
> > > 14/12/11 02:25:25 WARN mapred.JobClient: Use GenericOptionsParser for
> > > parsing the arguments. Applications should implement Tool for the same.
> > > 14/12/11 02:25:26 INFO mapred.JobClient: Cleaning up the staging area
> > > hdfs://localhost:8020/var/lib/hadoop-hdfs/cache/mapred/
> > > mapred/staging/training/.staging/job_201412110028_0010
> > > 14/12/11 02:25:26 ERROR security.UserGroupInformation:
> > > PriviledgedActionException as:training (auth:SIMPLE)
> > > cause:org.apache.hadoop.mapred.FileAlreadyExistsException: Output
> > directory
> > > hdfs://localhost:8020/user/training/wordcountout already exists
> > > Exception in thread "main"
> > org.apache.hadoop.mapred.FileAlreadyExistsException:
> > > Output directory hdfs://localhost:8020/user/training/wordcountout
> already
> > > exists
> > > at org.apache.hadoop.mapred.FileOutputFormat.checkOutputSpecs(
> > > FileOutputFormat.java:117)
> > > at org.apache.hadoop.mapred.JobClient$2.run(JobClient.java:986)
> > > at org.apache.hadoop.mapred.JobClient$2.run(JobClient.java:945)
> > > at java.security.AccessController.doPrivileged(Native Method)
> > > at javax.security.auth.Subject.doAs(Subject.java:415)
> > > at org.apache.hadoop.security.UserGroupInformation.doAs(
> > > UserGroupInformation.java:1408)
> > > at org.apache.hadoop.mapred.JobClient.submitJobInternal(
> > > JobClient.java:945)
> > > at org.apache.hadoop.mapred.JobClient.submitJob(JobClient.java:919)
> > > at org.apache.hadoop.mapred.JobClient.runJob(JobClient.java:1368)
> > > at wordcount1.WordCount.run(WordCount.java:45)
> > > at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
> > > at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:84)
> > > at wordcount1.WordCount.main(WordCount.java:51)
> > > 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:606)
> > > at org.apache.hadoop.util.RunJar.main(RunJar.java:208)
> >
> >
> >
> > --
> > - Tsuyoshi
> >
>
Re: wordcount program error!
Posted by Nada Saif <na...@gmail.com>.
Ok thanks a lot!
It works finally , I forgot that hadoop adds the output directory
autumatically .
Regards,
Nada
On Dec 11, 2014 1:01 AM, "Tsuyoshi OZAWA" <oz...@gmail.com> wrote:
> Please remove the output directory you specified:
>
> hdfs dfs -rm -r wordcountout
>
> Thanks,
> - Tsuyoshi
>
> On Thu, Dec 11, 2014 at 7:25 AM, Nada Saif <na...@gmail.com> wrote:
> > Hi Tsuyoshi,
> >
> > I doubled check ,the wordcoutout folder is empty!?
> >
> > Regards
> >
> > On Thu, Dec 11, 2014 at 12:20 AM, Tsuyoshi OZAWA <
> ozawa.tsuyoshi@gmail.com>
> > wrote:
> >
> >> Hi Nada,
> >>
> >> Please check the stack trace:
> >> FileAlreadyExistsException:
> >> Output directory hdfs://localhost:8020/user/training/wordcountout
> already
> >> exists
> >>
> >> The output directory you passed to the program already exists. Please
> >> check it.
> >>
> >> Thanks,
> >> - Tsuyoshi
> >>
> >> On Thu, Dec 11, 2014 at 7:13 AM, Nada Saif <na...@gmail.com>
> wrote:
> >> > Hi ,
> >> >
> >> > I'm confused with mapreduce wordcount , I get this error when run the
> >> > program
> >> >
> >> > I don't know what's wrong,I'm sure about the code ,because it works
> >> before
> >> > well.
> >> > and I notice there is an exception about "file already exist ", the
> >> folder
> >> > is empty ,and I even tried another output folder!
> >> >
> >> > Can you please help!
> >> >
> >> > Thanks
> >> >
> >> >
> >> > 14/12/11 02:25:25 WARN mapred.JobClient: Use GenericOptionsParser for
> >> > parsing the arguments. Applications should implement Tool for the
> same.
> >> > 14/12/11 02:25:26 INFO mapred.JobClient: Cleaning up the staging area
> >> > hdfs://localhost:8020/var/lib/hadoop-hdfs/cache/mapred/
> >> > mapred/staging/training/.staging/job_201412110028_0010
> >> > 14/12/11 02:25:26 ERROR security.UserGroupInformation:
> >> > PriviledgedActionException as:training (auth:SIMPLE)
> >> > cause:org.apache.hadoop.mapred.FileAlreadyExistsException: Output
> >> directory
> >> > hdfs://localhost:8020/user/training/wordcountout already exists
> >> > Exception in thread "main"
> >> org.apache.hadoop.mapred.FileAlreadyExistsException:
> >> > Output directory hdfs://localhost:8020/user/training/wordcountout
> already
> >> > exists
> >> > at org.apache.hadoop.mapred.FileOutputFormat.checkOutputSpecs(
> >> > FileOutputFormat.java:117)
> >> > at org.apache.hadoop.mapred.JobClient$2.run(JobClient.java:986)
> >> > at org.apache.hadoop.mapred.JobClient$2.run(JobClient.java:945)
> >> > at java.security.AccessController.doPrivileged(Native Method)
> >> > at javax.security.auth.Subject.doAs(Subject.java:415)
> >> > at org.apache.hadoop.security.UserGroupInformation.doAs(
> >> > UserGroupInformation.java:1408)
> >> > at org.apache.hadoop.mapred.JobClient.submitJobInternal(
> >> > JobClient.java:945)
> >> > at
> org.apache.hadoop.mapred.JobClient.submitJob(JobClient.java:919)
> >> > at org.apache.hadoop.mapred.JobClient.runJob(JobClient.java:1368)
> >> > at wordcount1.WordCount.run(WordCount.java:45)
> >> > at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
> >> > at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:84)
> >> > at wordcount1.WordCount.main(WordCount.java:51)
> >> > 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:606)
> >> > at org.apache.hadoop.util.RunJar.main(RunJar.java:208)
> >>
> >>
> >>
> >> --
> >> - Tsuyoshi
> >>
>
>
>
> --
> - Tsuyoshi
>
Re: wordcount program error!
Posted by Tsuyoshi OZAWA <oz...@gmail.com>.
Please remove the output directory you specified:
hdfs dfs -rm -r wordcountout
Thanks,
- Tsuyoshi
On Thu, Dec 11, 2014 at 7:25 AM, Nada Saif <na...@gmail.com> wrote:
> Hi Tsuyoshi,
>
> I doubled check ,the wordcoutout folder is empty!?
>
> Regards
>
> On Thu, Dec 11, 2014 at 12:20 AM, Tsuyoshi OZAWA <oz...@gmail.com>
> wrote:
>
>> Hi Nada,
>>
>> Please check the stack trace:
>> FileAlreadyExistsException:
>> Output directory hdfs://localhost:8020/user/training/wordcountout already
>> exists
>>
>> The output directory you passed to the program already exists. Please
>> check it.
>>
>> Thanks,
>> - Tsuyoshi
>>
>> On Thu, Dec 11, 2014 at 7:13 AM, Nada Saif <na...@gmail.com> wrote:
>> > Hi ,
>> >
>> > I'm confused with mapreduce wordcount , I get this error when run the
>> > program
>> >
>> > I don't know what's wrong,I'm sure about the code ,because it works
>> before
>> > well.
>> > and I notice there is an exception about "file already exist ", the
>> folder
>> > is empty ,and I even tried another output folder!
>> >
>> > Can you please help!
>> >
>> > Thanks
>> >
>> >
>> > 14/12/11 02:25:25 WARN mapred.JobClient: Use GenericOptionsParser for
>> > parsing the arguments. Applications should implement Tool for the same.
>> > 14/12/11 02:25:26 INFO mapred.JobClient: Cleaning up the staging area
>> > hdfs://localhost:8020/var/lib/hadoop-hdfs/cache/mapred/
>> > mapred/staging/training/.staging/job_201412110028_0010
>> > 14/12/11 02:25:26 ERROR security.UserGroupInformation:
>> > PriviledgedActionException as:training (auth:SIMPLE)
>> > cause:org.apache.hadoop.mapred.FileAlreadyExistsException: Output
>> directory
>> > hdfs://localhost:8020/user/training/wordcountout already exists
>> > Exception in thread "main"
>> org.apache.hadoop.mapred.FileAlreadyExistsException:
>> > Output directory hdfs://localhost:8020/user/training/wordcountout already
>> > exists
>> > at org.apache.hadoop.mapred.FileOutputFormat.checkOutputSpecs(
>> > FileOutputFormat.java:117)
>> > at org.apache.hadoop.mapred.JobClient$2.run(JobClient.java:986)
>> > at org.apache.hadoop.mapred.JobClient$2.run(JobClient.java:945)
>> > at java.security.AccessController.doPrivileged(Native Method)
>> > at javax.security.auth.Subject.doAs(Subject.java:415)
>> > at org.apache.hadoop.security.UserGroupInformation.doAs(
>> > UserGroupInformation.java:1408)
>> > at org.apache.hadoop.mapred.JobClient.submitJobInternal(
>> > JobClient.java:945)
>> > at org.apache.hadoop.mapred.JobClient.submitJob(JobClient.java:919)
>> > at org.apache.hadoop.mapred.JobClient.runJob(JobClient.java:1368)
>> > at wordcount1.WordCount.run(WordCount.java:45)
>> > at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
>> > at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:84)
>> > at wordcount1.WordCount.main(WordCount.java:51)
>> > 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:606)
>> > at org.apache.hadoop.util.RunJar.main(RunJar.java:208)
>>
>>
>>
>> --
>> - Tsuyoshi
>>
--
- Tsuyoshi
Re: wordcount program error!
Posted by Nada Saif <na...@gmail.com>.
Hi Tsuyoshi,
I doubled check ,the wordcoutout folder is empty!?
Regards
On Thu, Dec 11, 2014 at 12:20 AM, Tsuyoshi OZAWA <oz...@gmail.com>
wrote:
> Hi Nada,
>
> Please check the stack trace:
> FileAlreadyExistsException:
> Output directory hdfs://localhost:8020/user/training/wordcountout already
> exists
>
> The output directory you passed to the program already exists. Please
> check it.
>
> Thanks,
> - Tsuyoshi
>
> On Thu, Dec 11, 2014 at 7:13 AM, Nada Saif <na...@gmail.com> wrote:
> > Hi ,
> >
> > I'm confused with mapreduce wordcount , I get this error when run the
> > program
> >
> > I don't know what's wrong,I'm sure about the code ,because it works
> before
> > well.
> > and I notice there is an exception about "file already exist ", the
> folder
> > is empty ,and I even tried another output folder!
> >
> > Can you please help!
> >
> > Thanks
> >
> >
> > 14/12/11 02:25:25 WARN mapred.JobClient: Use GenericOptionsParser for
> > parsing the arguments. Applications should implement Tool for the same.
> > 14/12/11 02:25:26 INFO mapred.JobClient: Cleaning up the staging area
> > hdfs://localhost:8020/var/lib/hadoop-hdfs/cache/mapred/
> > mapred/staging/training/.staging/job_201412110028_0010
> > 14/12/11 02:25:26 ERROR security.UserGroupInformation:
> > PriviledgedActionException as:training (auth:SIMPLE)
> > cause:org.apache.hadoop.mapred.FileAlreadyExistsException: Output
> directory
> > hdfs://localhost:8020/user/training/wordcountout already exists
> > Exception in thread "main"
> org.apache.hadoop.mapred.FileAlreadyExistsException:
> > Output directory hdfs://localhost:8020/user/training/wordcountout already
> > exists
> > at org.apache.hadoop.mapred.FileOutputFormat.checkOutputSpecs(
> > FileOutputFormat.java:117)
> > at org.apache.hadoop.mapred.JobClient$2.run(JobClient.java:986)
> > at org.apache.hadoop.mapred.JobClient$2.run(JobClient.java:945)
> > at java.security.AccessController.doPrivileged(Native Method)
> > at javax.security.auth.Subject.doAs(Subject.java:415)
> > at org.apache.hadoop.security.UserGroupInformation.doAs(
> > UserGroupInformation.java:1408)
> > at org.apache.hadoop.mapred.JobClient.submitJobInternal(
> > JobClient.java:945)
> > at org.apache.hadoop.mapred.JobClient.submitJob(JobClient.java:919)
> > at org.apache.hadoop.mapred.JobClient.runJob(JobClient.java:1368)
> > at wordcount1.WordCount.run(WordCount.java:45)
> > at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
> > at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:84)
> > at wordcount1.WordCount.main(WordCount.java:51)
> > 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:606)
> > at org.apache.hadoop.util.RunJar.main(RunJar.java:208)
>
>
>
> --
> - Tsuyoshi
>
Re: wordcount program error!
Posted by Tsuyoshi OZAWA <oz...@gmail.com>.
Hi Nada,
Please check the stack trace:
FileAlreadyExistsException:
Output directory hdfs://localhost:8020/user/training/wordcountout already
exists
The output directory you passed to the program already exists. Please check it.
Thanks,
- Tsuyoshi
On Thu, Dec 11, 2014 at 7:13 AM, Nada Saif <na...@gmail.com> wrote:
> Hi ,
>
> I'm confused with mapreduce wordcount , I get this error when run the
> program
>
> I don't know what's wrong,I'm sure about the code ,because it works before
> well.
> and I notice there is an exception about "file already exist ", the folder
> is empty ,and I even tried another output folder!
>
> Can you please help!
>
> Thanks
>
>
> 14/12/11 02:25:25 WARN mapred.JobClient: Use GenericOptionsParser for
> parsing the arguments. Applications should implement Tool for the same.
> 14/12/11 02:25:26 INFO mapred.JobClient: Cleaning up the staging area
> hdfs://localhost:8020/var/lib/hadoop-hdfs/cache/mapred/
> mapred/staging/training/.staging/job_201412110028_0010
> 14/12/11 02:25:26 ERROR security.UserGroupInformation:
> PriviledgedActionException as:training (auth:SIMPLE)
> cause:org.apache.hadoop.mapred.FileAlreadyExistsException: Output directory
> hdfs://localhost:8020/user/training/wordcountout already exists
> Exception in thread "main" org.apache.hadoop.mapred.FileAlreadyExistsException:
> Output directory hdfs://localhost:8020/user/training/wordcountout already
> exists
> at org.apache.hadoop.mapred.FileOutputFormat.checkOutputSpecs(
> FileOutputFormat.java:117)
> at org.apache.hadoop.mapred.JobClient$2.run(JobClient.java:986)
> at org.apache.hadoop.mapred.JobClient$2.run(JobClient.java:945)
> at java.security.AccessController.doPrivileged(Native Method)
> at javax.security.auth.Subject.doAs(Subject.java:415)
> at org.apache.hadoop.security.UserGroupInformation.doAs(
> UserGroupInformation.java:1408)
> at org.apache.hadoop.mapred.JobClient.submitJobInternal(
> JobClient.java:945)
> at org.apache.hadoop.mapred.JobClient.submitJob(JobClient.java:919)
> at org.apache.hadoop.mapred.JobClient.runJob(JobClient.java:1368)
> at wordcount1.WordCount.run(WordCount.java:45)
> at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
> at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:84)
> at wordcount1.WordCount.main(WordCount.java:51)
> 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:606)
> at org.apache.hadoop.util.RunJar.main(RunJar.java:208)
--
- Tsuyoshi