-1

我的 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$ 
4

1 回答 1

1

The hadoop command is not found because it is not specified in your PATH variable. Try this:

export PATH=$PATH:~/hadoop-1.0.4/bin/
于 2013-07-17T07:12:40.457 回答