Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Big Data Hadoop & Spark by (11.9k points)

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 trying

enter image description here

1 Answer

0 votes
by (32.1k points)

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.

Related questions

+1 vote
1 answer
asked Jun 7, 2019 in Java by Harpreet (750 points)
0 votes
1 answer
0 votes
1 answer

Browse Categories

...