在独立模式下执行hadoop示例时权限被拒绝

时间:2013-03-05 15:51:47

标签: hadoop mapreduce

我试图在独立模式下运行hadoop。当我尝试执行命令

bin/hadoop jar hadoop-mapred-examples-0.21.0.jar grep input output

我收到以下错误:

laxmikant@laxmikant-Inspiron-1464:~/Work/hadoop-0.21.0$ bin/hadoop jar hadoop-mapred-  examples-0.21.0.jar grep input output
/home/laxmikant/Work/hadoop-0.21.0/bin/hadoop-config.sh: line 189:     /home/laxmikant/java/jdk1.7.0_04/bin/java: Permission denied
bin/hadoop: line 120: /home/laxmikant/java/jdk1.7.0_04/bin/java: Permission denied
bin/hadoop: line 120: exec: /home/laxmikant/java/jdk1.7.0_04/bin/java: cannot execute:     Permission denied

如何删除错误?

1 个答案:

答案 0 :(得分:0)

您运行hadoop的用户似乎没有运行java的权限。 但是通过查看java的二进制文件所在的路径(/ home / laxmikant / java /),用户laxmikant或root用户都可以轻松访问它。因此,如果您尝试以用户laxmikant执行它并仍然收到错误,那么可能没有正确安装Java。另外,请确保在hadoop的conf / hadoop-env.sh中正确设置JAVA_HOME