MY HADOOP started on single node . But while running word count programm it shows following error. What may be the problem ?
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
You need to use the hadoop script in the bin folder and the jar sub command to invoke your job, try this:
hduser@reshmi-Inspiron-1545:~$ cd ~/hadoop-1.0.4
hduser@reshmi-Inspiron-1545:~/hadoop-1.0.4$ bin/hadoop jar hadoop-examples-1.0.4.jar \
wordcount /home/hduser/hadoop-1.0.4/dft \
/home/hduser/hadoop-1.0.4/dft-output
I'm also assuming from your input and output paths that your hadoop is configured for local mode (as the paths are local paths: /home/hduser)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.