简体   繁体   English

由于权限被拒绝,在hadoop.tmp.dir / tmp / hadoop-sha中创建临时目录时出错

[英]Error creating temp dir in hadoop.tmp.dir /tmp/hadoop-sha due to Permission denied

I got the following error message when I ran my java map reduce code on the hadoop cluster: 当我在hadoop集群上运行java map reduce代码时,出现以下错误消息:

-sh-3.2$ hadoop jar PearsonSim1.jar PearsonSim.PearsonDriver1 /user/sha/data/rating_sample_item /user/sha/cf/PearsonSim1

"Error creating temp dir in hadoop.tmp.dir /tmp/hadoop-sha due to Permission denied" “由于权限被拒绝,在hadoop.tmp.dir / tmp / hadoop-sha中创建临时目录时出错”

Has anyone encountered such problem before? 有人遇到过这样的问题吗? I'm wondering whether there's any issue with my code or simply account permission setup. 我想知道我的代码是否有问题,或者仅仅是帐户权限设置。 My code works fine on Cloudera's CDH3 VM. 我的代码在Cloudera的CDH3 VM上运行良好。

Could anyone shed some light? 谁能给我一些启示?

hadoop.tmp.dir is used by the job client to assemble your job classes / files etc before sending them up to the job tracker. 作业客户端使用hadoop.tmp.dir组装作业类/文件等,然后再将其发送到作业跟踪器。

For you to get this error message, one of the following is probably true: 为了使您获得此错误消息,可能是以下情况之一:

You don't have write & execute permissions on the /tmp directory as your current user. 您/ tmp目录没有当前用户的写和执行权限。 Try manually creating a directory in /tmp and see if you get an error message. 尝试在/ tmp中手动创建目录,然后查看是否收到错误消息。 If you do then you'll need to open up the permissions on that folder ( sudo chmod a+rwx /tmp ) 如果这样做,则需要打开该文件夹的权限( sudo chmod a+rwx /tmp

If that's ok, then does the directory /tmp/hadoop-sha already exist, and do you have permissions to write to that folder? 如果可以,那么目录/ tmp / hadoop-sha是否已经存在,您是否有权写入该文件夹?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM