1. 测试环境
master-slave模式
master包含3台机器,1台NameNode(Master),2台DataNode(Slave)
slave包含3台机器,1台NameNode(Master),2台DataNode(Slave)
2. 分别安装hadoop,zookeeper,hbase(不使用hbase自带zookeeper)
配置和hadoop+zookeeper+hbase的一般集群配置没有区别。要特别说明的是zookeeper的配置,在这里绕了很久,我才配置成功。在这里特别记录下
在6台机器上均独立安装了zookeeper,修改zookeeper/conf/zoo.cfg
dataDir=/hadoop/data/zookeeper
# the port at which the clients will connect
clientPort=2222
#
# Be sure to read the maintenance section of the
# administrator guide before turning on autopurge.
#
# http://zookeeper.apache.org/doc/current/zookeeperAdmin.html#sc_maintenance
#
# The number of snapshots to retain in dataDir
#autopurge.snapRetainCount=3
# Purge task interval in hours
# Set to "0" to disable auto purge feature
#autopurge.purgeInterval=1
server.1=master59:2887:3887
server.2=slave58:2888:3888
server.3=slave57:2889:3889
server.4=master40:2887:3887
server.5=slave41:2888:3888
server.6=slave42:2889:3889