I am setting up a single node cluster on Ubuntu and using the usual guides, Running Hadoop on Ubuntu Linux (Single-Node Cluster) .
All goes well until I get to formatting the HDFS Namenode
hduser@ubuntu:~$ /usr/local/hadoop/bin/hadoop namenode -format
or
hadoop@ubuntu:~$ <HADOOP_INSTALL>/hadoop/bin/hadoop namenode -format
I am unable to find the correct location to run this command. This is most likely due to my unfamiliarity with Linux.
I installed Hadoop using the deb from the 17 Oct, 2011: release 0.20.205.0
The articles you list instruct you to explicitly install hadoop to /usr/local, but if you didn't install it in this location then there is a trick you can employ to find where you actually installed hadoop:
#> sudo updatedb
#> locate start-dfs.sh
/opt/hadoop-0.20.2/bin/start-dfs.sh
#> ls -l /opt/hadoop-0.20.2/bin/
hadoop rcc start-dfs.sh stop-dfs.sh
hadoop-config.sh slaves.sh start-mapred.sh stop-mapred.sh
hadoop-daemon.sh start-all.sh stop-all.sh
hadoop-daemons.sh start-balancer.sh stop-balancer.sh
This should list the location of the hadoop start-dfs.sh command, and in this location will also be the hadoop script you are looking for.
If you installed Hadoop from a deb package (as you note towards the end), then you can follow the instructions in this post to list the contents of the deb, and hopefully find where the package was installed to:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.