HA Hadoop-2.7.3+Hbase-1.2.4搭建

来源:互联网 发布:网络二层协议 编辑:程序博客网 时间:2024/06/01 10:10

继《Hadoop-2.7.3集群(HA HDFS)搭建》之后,尝试搭建分布式的Hbase集群。以下是在HA HDFS运行的情况下,增加hbase集群。

 

1、在hbase-env.sh里export JAVA_HOME。

2、修改hbase-site.xml

<configuration>    <property>        <name>hbase.rootdir</name>        <value>hdfs://chan-takchi:9000/hbase</value>    </property>        <property>        <name>hbase.cluster.distributed</name>        <value>true</value>    </property>    <property>        <name>hbase.zookeeper.quorum</name>        <value>chan-takchi-01,chan-takchi-02,chan-takchi-03</value>    </property></configuration>


3、修改regionservers

chan-takchi-01chan-takchi-02


4、同步所有修改的配置文件到所有节点。

5、在active的namenode上启动hbase,稍候便能看到HMaster,以及从节点上的HRegionServer了。

bin/start-hbase.sh


6、浏览器打开http://chan-takchi:16010,即可看到hbase集群的运行状态。

 

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

 

经过以上步骤后虽然能打开hbase的ui页面,但仍存有问题。

 

通过shell命令进行list的时候,报错 “ERROR: org.apache.hadoop.hbase.PleaseHoldException: org.apache.hadoop.hbase.PleaseHoldException: Master is initializing”。

再查看regionserver的log日志时发现有以下内容:

2017-01-22 00:21:22,046 INFO  [regionserver/ubuntu/127.0.1.1:16020] regionserver.HRegionServer: reportForDuty to master=ubuntu,16000,1485072757872 with port=16020, startcode=14850727594042017-01-22 00:21:22,047 WARN  [regionserver/ubuntu/127.0.1.1:16020] regionserver.HRegionServer: error telling master we are upcom.google.protobuf.ServiceException: java.net.ConnectException: Connection refused

 

解决方案:注意到“master=ubuntu”,这并不是我们期待的master,而且ubuntu这个域名是在安装虚拟机时设定的。把/etc/hostname中的ubuntu去掉并修改为chan-takchi或者chan-takchi-0*等,重启hbase即可。

0 0
原创粉丝点击