An error is reported when running hadoop job in Windows:
12/07/18 20:00:02 error security. usergroupinformation: priviledgedactionexception as: Administrator cause: Java. io. ioexception: failed to set permissions of path: \ TMP \ hadoop-Administrator \ mapred \ staging \ administrator343777043 \. staging to 0700java. io. ioexception: failed to set permissions of path: \ TMP \ hadoop-Administrator \ mapred \ staging \ administrator343777043 \. staging to 0700at Org. apache. hadoop. FS. fileutil. checkreturnvalue (fileutil. java: 682) at Org. apache. hadoop. FS. fileutil. setpermission (fileutil. java: 655) at Org. apache. hadoop. FS. rawlocalfilesystem. setpermission (rawlocalfilesystem. java: 509) at Org. apache. hadoop. FS. rawlocalfilesystem. mkdirs (rawlocalfilesystem. java: 344) at Org. apache. hadoop. FS. filterfilesystem. mkdirs (filterfilesystem. java: 189) at Org. apache. hadoop. mapreduce. jobsubmissionfiles. getstagingdir (jobsubmissionfiles. java: 116) at Org. apache. hadoop. mapred. jobclient $ 2.run( jobclient. java: 856) at Org. apache. hadoop. mapred. jobclient $ 2.run( jobclient. java: 850) at java. security. accesscontroller. doprivileged (native method) at javax. security. auth. subject. DOAs (unknown source) at Org. apache. hadoop. security. usergroupinformation. DOAs (usergroupinformation. java: 1093) at Org. apache. hadoop. mapred. jobclient. submitjobinternal (jobclient. java: 850) at Org. apache. hadoop. mapred. jobclient. submitjob (jobclient. java: 824) at Org. apache. hadoop. mapred. jobclient. runjob (jobclient. java: 1261)
Replace the hadoop-core-1.0.2.jar referenced by the project with a hadoop-core-0.20.2.jar.
Refer:
Http://hi.baidu.com/fedora_12/item/43a8c4baafbfbbf963388eeb
Http://stackoverflow.com/questions/10509427/haddop-in-windows
Https://issues.apache.org/jira/browse/HADOOP-7682
Another method:
HadoopSource codePut org. Apache. hadoop. fs. fileutil in the project and modify fileutil. checkreturnvalue by yourself so that this exception is not reported in windows.
Or re-compile the hadoop jar.