HA Hadoop-2.7.3+Hbase-1.2.4搭建

继《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-01
chan-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=1485072759404
2017-01-22 00:21:22,047 WARN  [regionserver/ubuntu/127.0.1.1:16020] regionserver.HRegionServer: error telling master we are up
com.google.protobuf.ServiceException: java.net.ConnectException: Connection refused

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

猜你喜欢

转载自blog.csdn.net/i792439187/article/details/54667372