hbase-- Fully Distributed Install

NodeName Master     ZooKeeper RegionServer

centos1       yes          yes             no

centos2       backup    yes             yes

centos3       no            yes             yes

 

 

1. config hbase

1.0 ~/.bashrc

export HBASE_HOME=/usr/local/hbase

export PATH=:$HBASE_HOME/bin

scp ~/.bashrc root@centos2:~/.bashrc

scp ~/.bashrc root@centos3:~/.bashrc

source ~/.bashrc

 

1.1 hbase-site.xml

<property>
  <name>hbase.cluster.distributed</name>
  <value>true</value>
</property>
<property>
  <name>hbase.rootdir</name>
  <!--hdfs://centos1:9000 is the value of fs.default.name in hdfs-site.xml under hadoop config folder-->
  <value>hdfs://centos1:9000/hbase</value> 
</property>

<!-- This configuration will direct HBase to start and manage a ZooKeeper instance on each node of the cluster. -->
<property>  
  <name>hbase.zookeeper.quorum</name>
  <value>centos1,centos2,centos3</value>
  <!--if each server has different port, the value could be centos1:2181,centos2:2181,centos3:2182  -->
</property>
<property>
  <name>hbase.zookeeper.property.dataDir</name>
  <value>/root/data/hbase/zookeeper</value>
</property>

 

 

1.2 conf/regionservers

centos2

centos3

 

1.3 conf/backup-masters

centos2

 

 

2. copy /usr/local/hbase to centos2 and centos3

scp -r /usr/local/hbase root@centos2:/usr/local/

scp -r /usr/local/hbase root@centos3:/usr/local/

 

 

3.Start Hbase on centos1

start-hbase.sh

 

 

4. run JPS on each server

centos1

20071 HQuorumPeer

20137 HMaster

centos2

15930 HRegionServer

15838 HQuorumPeer

16010 HMaster

centos3

13639 HQuorumPeer

13737 HRegionServer

 

 

5. Test webpage

http://centos1:16010/  master

http://centos2:16010/  secondary master

http://centos2:16030/  RegionServers

http://centos3:16030/  RegionServers

 

 

6. Tell HBase whether it should manage it's own instance of Zookeeper or not. 

vi /usr/local/hbase/conf/hbase-env.sh

    export HBASE_MANAGES_ZK=false

scp /usr/local/hbase/conf/hbase-env.sh root@centos2:/usr/local/hbase/conf/hbase-env.sh

scp /usr/local/hbase/conf/hbase-env.sh root@centos3:/usr/local/hbase/conf/hbase-env.sh

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

qq_26182553

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值