当前位置: 代码迷 >> Java相关 >> 运行hadoop wordcount例子异常security.UserGroupInformation: PriviledgedActionException
  详细解决方案

运行hadoop wordcount例子异常security.UserGroupInformation: PriviledgedActionException

热度:96   发布时间:2016-04-22 19:57:33.0
运行hadoop wordcount例子错误security.UserGroupInformation: PriviledgedActionException
 hadoop jar ../hadoop-examples-1.0.4.jar wordcount in out
13/04/11 11:52:11 INFO mapred.JobClient: Cleaning up the staging area hdfs://localhost:9000/hadoop/sysdata/1.0.4/tmp/mapred/staging/cyg_server_ssh/.staging/job_201304111033_0003
13/04/11 11:52:11 ERROR security.UserGroupInformation: PriviledgedActionException as:cyg_server_ssh cause:org.apache.hadoop.mapred.FileAlreadyExistsException: Output directory out already exists
org.apache.hadoop.mapred.FileAlreadyExistsException: Output directory out already exists
        at org.apache.hadoop.mapreduce.lib.output.FileOutputFormat.checkOutputSpecs(FileOutputFormat.java: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:396)
        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:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        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:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.hadoop.util.RunJar.main(RunJar.java:156)

------解决思路----------------------
apache.hadoop.mapred.FileAlreadyExistsException: Output directory out already exists
--看这句,是你的输出目录已经存在了,就会报错..
--hadoop运行结果的输出路径是不能事先存在的, 必须要运行过程中hadoop给你生成目录..
  相关解决方案