简体   繁体   English

Ubuntu 12.04 LTS上的Hadoop单节点群集安装在哪里?

[英]Where is Hadoop single node cluster installed on Ubuntu 12.04 LTS?

I am setting up a single node cluster on Ubuntu and using the usual guides, Running Hadoop on Ubuntu Linux (Single-Node Cluster) . 我正在Ubuntu上设置一个单节点群集,并使用通常的指南在Ubuntu Linux上运行Hadoop(单节点群集)

All goes well until I get to formatting the HDFS Namenode 一切顺利,直到我格式化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. 这很可能是由于我不熟悉Linux。

I installed Hadoop using the deb from the 17 Oct, 2011: release 0.20.205.0 我从2011年10月17日开始使用deb安装了Hadoop: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: 您列出的文章指示您将hadoop显式安装到/ usr / local,但是如果您没有在此位置安装hadoop,则可以使用一个技巧来找到实际安装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. 这应该列出hadoop start-dfs.sh命令的位置,并且在该位置还将是您正在寻找的hadoop脚本。

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: 如果您是通过deb软件包安装Hadoop的(如您在结尾处所述),则可以按照本文中的说明列出deb的内容,并希望找到该软件包的安装位置:

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM