Why Am I Getting The Hadoop Command And Not Finding An Error?
I have installed and configured Hadoop on my Linux machine. I am trying to run a sample MR job. And, started the Hadoop via the command /usr/local/hadoop/bin/start-all.sh and It gives me output as shown below.
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 thought it was configured successfully. But when I am trying to run the below command it is giving an error Hadoop command not found, as shown below
jeet@jeet-Vostro-2520:~$ hadoop fs -put gettysburg.txt /user/jeet/getty/gettysburg.txt
hadoop: command not found
If you see - hadoop command not found
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:
Then you need to reopen your terminal.