hadoop--搭建hbase集群

背景

我们已经搭建了HA高可用的hdfs集群,现在要在hdfs集群的基础上搭建hbase集群。可以看我之前的一篇hdfs集群搭建,

https://blog.csdn.net/fantasticqiang/article/details/80707837

自行官网下载hbase,我这里选用1.2.3版本

修改hbase配置文件

1. hbase-env.sh
//#配置一下JAVA环境
export JAVA_HOME=/usr/local/jdk
//# Tell HBase whether it should manage it's own instance of Zookeeper or not.
export HBASE_MANAGES_ZK=false

2. hbase-site.xml

<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<!--
/**
 *
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
-->
<configuration>
<property>
    <name>hbase.cluster.distributed</name>
    <value>true</value>
</property>
<property>
    <name>hbase.rootdir</name>
    <value>hdfs://mycluster/hbase</value>
</property>
<property>
    <name>hbase.zookeeper.quorum</name>
    <value>es02:2181,es03:2181,es04:2181</value>
</property>
<property>
    <name>hbase.zookeeper.property.dataDir</name>
    <value>/home/hadoop/zk/data</value>
</property>
</configuration>
3. 配置regionservers,regionserver的节点
es02
es03
es04

注意事项

由于hdfs配置了HA高可用,我们在hadoop的hdfs-site.xml中配置了"dfs.nameservices"的名称“mycluster”他下面有两个名称节点“nn1,nn2”,我们需要把hadoop中的hdfs-site.xml和core-site.xml放到hbase目录下的conf文件夹中,不然hbase集群在启动的时候会报"unkonwHostException"。

启动测试

//启动命令
start-hbase.sh

登录webUI 查看


  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值