yixietianxia 2013-07-15
Hbase数据库依赖 Hadoop和zookeeper,所以,安装Hbase之前,需要先把zookeeper集群搭建好。(当然,Hbase有内建的zookeeper,不过不建议使用)。Hbase配置上有几个需要注意的点:
1 hbase-env.sh 中 export HBASE_MANAGES_ZK=false
告诉Hbase不使用内建的zookeeper;
2 hbase-site.xml 中
<configuration>
<property>
<name>hbase.rootdir</name>r
<value>hdfs://master:9000/hbase</value> //必须与你的hadoop主机名,端口号一致
</property>
<property>
<name>hbase.cluster.distributed</name>
<value>true</value> //开启集群配置
</property>
<property>
<name>hbase.zookeeper.quorum</name>
<value>wangmaojun,lovemelovemycode,peirong</value> //zookeeper集群里每个机器的名字,包括Hmaster上的和HRegionServer上的
</property>
<property>
<name>hbase.master</name>
<value>wangmaojun:60000</value>
</property>
<property>
<name>zookeeper.session.timeout</name>
<value>60000</value>
</property>
<property>
<name>hbase.zookeeper.property.clientPort</name>
<value>2181</value> //要与zookeeper zoo.cfg中的配置一致哦
</property>
<property>
<name>hbase.zookeeper.property.dataDir</name>
<value>/home/hadoop/zookeeper_data</value> //要与zookeeper zoo.cfg中的配置一致哦
<description>Property fromZooKeeper's config zoo.cfg.
The directory where the snapshot isstored.
</description>
</property>
</configuration>
3 regionservers中配置如下:
lovemelovemycode
peirong
相关阅读: