首页 > 代码库 > Hadoop配置文件与HBase配置文件
Hadoop配置文件与HBase配置文件
本Hadoop与HBase集群有1台NameNode, 7台DataNode
1. /etc/hostname文件
NameNode:
node1
DataNode 1:
node2
DataNode 2:
node3.......
DataNode 7:
node8
2. /etc/hosts文件
NameNode:
127.0.0.1 localhost #127.0.1.1 node1 #-------edit by HY(2014-05-04)-------- #127.0.1.1 node1 125.216.241.113 node1 125.216.241.112 node2 125.216.241.96 node3 125.216.241.111 node4 125.216.241.114 node5 125.216.241.115 node6 125.216.241.116 node7 125.216.241.117 node8 #-------end edit-------- # The following lines are desirable for IPv6 capable hosts ::1 ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters
DataNode 1:
127.0.0.1 localhost #127.0.0.1 node2 #127.0.1.1 node2 #--------eidt by HY(2014-05-04)-------- 125.216.241.113 node1 125.216.241.112 node2 125.216.241.96 node3 125.216.241.111 node4 125.216.241.114 node5 125.216.241.115 node6 125.216.241.116 node7 125.216.241.117 node8 #-------end eidt--------- # The following lines are desirable for IPv6 capable hosts ::1 ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters
其他的DataNode类似,只是注意要保持hostname与hosts中的域名要一样, 如果不一样, 在集群上跑任务时会出一些莫名奇妙的问题, 具体什么问题忘记了.
3. 在hadoop-env.sh中注释
# export JAVA_HOME=/usr/lib/j2sdk1.5-sun
增加
JAVA_HOME=/usr/lib/jvm/java-6-sun
4. core-site.xml
<?xml version="1.0"?> <?xml-stylesheet type="text/xsl" href=http://www.mamicode.com/"configuration.xsl"?>>
5. hdfs-site.xml<?xml version="1.0"?> <?xml-stylesheet type="text/xsl" href=http://www.mamicode.com/"configuration.xsl"?>>6. mapred-site.xml
<?xml version="1.0"?> <?xml-stylesheet type="text/xsl" href=http://www.mamicode.com/"configuration.xsl"?>>7. masters
node18. slaves
node2 node3 node4 node5 node6 node7 node89. 在hbase-env.sh
增加
JAVA_HOME=/usr/lib/jvm/java-6-sun
并启用export HBASE_MANAGES_ZK=true //为true表示使用自带的Zookeeper, 如果需要独立的Zookeeper,则设置为false, 并且安装Zookeeper
10. hbase-site.xml
<?xml version="1.0"?> <?xml-stylesheet type="text/xsl" href=http://www.mamicode.com/"configuration.xsl"?>>11. regionservers
node2 node3 node4 node5 node6 node7 node8每台机器配置都要一样
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。