ZooKeeper集群下hbase如何配置
更新:HHH   时间:2023-1-7


这篇文章主要介绍ZooKeeper集群下hbase如何配置,文中介绍的非常详细,具有一定的参考价值,感兴趣的小伙伴们一定要看完!

把zookeeper启动起来
我们这里有三台ZK,slave1.hadoop,slave2.hadoop,slave3.hadoop
例如配置文件zoo.cfg
clientPort=2181
server.1=slave1.hadoop:2888:3888
server.2=slave2.hadoop:2888:3888
server.3=slave3.hadoop:2888:3888

Hbase的相关配置
修改hbase-env.sh
export JAVA_HOME=/usr/lib/jvm/jre-1.7.0-openjdk.x86_64
export HBASE_IDENT_STRING=$HOSTNAME
export HBASE_CLASSPATH=/home/hadoop/hbase-0.96/lib
export HBASE_MANAGES_ZK=false

 修改hbase-site.xml
<property>
                   <name>hbase.master</name>
                   <value>slave1.hadoop:60000</value>
         </property>
         <property>
                   <name>hbase.rootdir</name>
                   <value>hdfs://slave1.hadoop:8020/hbase</value>
         </property>
         <property>
                   <name>hbase.cluster.distributed</name>
                   <value>true</value>
         </property>
         <property>
                   <name>hbase.zookeeper.property.clientPort</name>
                   <value>2181</value>
         </property>
         <property>
                   <name>hbase.zookeeper.quorum</name>
                   <value>slave1.hadoop,slave2.hadoop,slave3.hadoop</value>
         </property>
         <property>
                   <name>hbase.regionserver.handler.count</name>
                   <value>100</value>
         </property>
         <property>
                   <name>hbase.client.write.buffer</name>
                   <value>5242880</value>
         </property>

以上是“ZooKeeper集群下hbase如何配置”这篇文章的所有内容,感谢各位的阅读!希望分享的内容对大家有帮助,更多相关知识,欢迎关注天达云行业资讯频道!

返回云计算教程...