我的hadoop是从一个节点开始的。但在运行字数计算程序时,它显示以下错误。有什么问题吗?
hduser@reshmi-Inspiron-1545:~/hadoop-1.0.4$hadoop-examples-1.0.4.jar wordcount
/home/hduser/hadoop-1.0.4/dft /home/hduser/hadoop-1.0.4/dft-output
/home/hduser/hadoop-1.0.4/hadoop-examples-1.0.4.jar: line 1: $'PK\003\004':command not found
/home/hduser/hadoop-1.0.4/hadoop-examples-1.0.4.jar: line 2: syntax error near unexpected token `)'
/home/hduser/hadoop-1.0.4/hadoop-examples-1.0.4.jar: line 2: `)CA META-INF/��PK'
hduser@reshmi-Inspiron-1545:~/hadoop-1.0.4$ ^C
hduser@reshmi-Inspiron-1545:~/hadoop-1.0.4$ cd ..
hduser@reshmi-Inspiron-1545:~$ /hadoop-1.0.4 hadoop-examples-1.0.4.jar wordcount
/home/hduser/hadoop-1.0.4/dft /home/hduser/hadoop-1.0.4/dft-output
bash: /hadoop-1.0.4: No such file or directory
hduser@reshmi-Inspiron-1545:~$ ^C
1条答案
按热度按时间q43xntqr1#
您需要使用bin文件夹中的hadoop脚本和jar子命令来调用作业,请尝试以下操作:
我还假设您的输入和输出路径将hadoop配置为本地模式(因为路径是local path:/home/hduser)