HADOOP wordcount计划

时间:2013-07-17 07:06:45

标签: java hadoop

我的hadoop已经启动,但我的hadoop命令都没有工作。

starting:

hduser@reshmi-Inspiron-1545:~$ cd hadoop-1.0.4/bin/
hduser@reshmi-Inspiron-1545:~/hadoop-1.0.4/bin$ ./start-all.sh 
Warning: $HADOOP_HOME is deprecated.

starting namenode, logging to /home/hduser/hadoop-1.0.4/libexec/../logs/hadoop-hduser-namenode-reshmi-Inspiron-1545.out
localhost: starting datanode, logging to /home/hduser/hadoop-1.0.4/libexec/../logs/hadoop-hduser-datanode-reshmi-Inspiron-1545.out
localhost: secondarynamenode running as process 4788. Stop it first.
jobtracker running as process 4882. Stop it first.
localhost: starting tasktracker, logging to /home/hduser/hadoop-1.0.4/libexec/../logs/hadoop-hduser-tasktracker-reshmi-Inspiron-1545.out
hduser@reshmi-Inspiron-1545:~/hadoop-1.0.4/bin$ 


checking :

hduser@reshmi-Inspiron-1545:~/hadoop-1.0.4/bin$ jps
4882 JobTracker
7995 Jps
4788 SecondaryNameNode



example :
hduser@reshmi-Inspiron-1545:~/hadoop-1.0.4/dft$ hadoop jar /home/hduser/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
hadoop: command not found
hduser@reshmi-Inspiron-1545:~/hadoop-1.0.4/dft$ 

1 个答案:

答案 0 :(得分:1)

找不到hadoop命令,因为未在PATH变量中指定。试试这个:

export PATH=$PATH:~/hadoop-1.0.4/bin/