Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hadoop command not found

Tags:

I have installed and configured hadoop in a linux machine .Now i am trying to run a sample MR job.I have started the hadoop via the command /usr/local/hadoop/bin/start-all.sh and the output is

namenode running as process 7876. Stop it first. localhost: datanode running as process 8083. Stop it first. localhost: secondarynamenode running as process 8304. Stop it first. jobtracker running as process 8398. Stop it first. localhost: tasktracker running as process 8612. Stop it first. 

so i think that my hadoop is configured successfully.But when i am tryinh to run below command it is giving

jeet@jeet-Vostro-2520:~$ hadoop fs -put gettysburg.txt /user/jeet/getty/gettysburg.txt hadoop: command not found 

i am new in hadoop.somebody please help .I am also posting the screenshot of what i am tryingenter image description here

like image 925
lucifer Avatar asked Jan 26 '14 20:01

lucifer


1 Answers

As it seems from your commands history, you can replace hadoop by /usr/local/hadoop/bin/hadoop and it should help.


If you want to use hadoop command without specifying the full path to it, you can edit ~/.bashrc file and add the following line:

export PATH=$PATH:/usr/local/hadoop/bin/ 

Then you need to reopen your terminal.

like image 124
Philip Voronov Avatar answered Sep 23 '22 16:09

Philip Voronov