最简单的-hbase2-集群搭建

hadoop集群搭建方案

hive单机搭建方案

hbase集群搭建方案

storm集群搭建方案

flume集群搭建方案

spark3集群搭建方案

机器:

10.211.55.67 master
10.211.55.68 slave1
10.211.55.69 slave2

配置环境变量

export HBASE_HOME=/home/hbase-2.2.4
export PATH=$PATH:$HBASE_HOME/bin:/$HBASE_HOME/sbin

cd /home/hbase-2.1.9/conf
配置hbase-site.xml

     <property>
           <name>hbase.rootdir</name>
           <value>hdfs://master: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>master,slave1,slave2</value>
     </property>
     <property>
         <name>hbase.unsafe.stream.capability.enforce</name>
         <value>false</value>
     </property>

配置hbase-env.sh,修改以下部分(不要用hbase 自带的zookeeper)

export JAVA_HOME=/home/jdk1.8.0_241
export HBASE_MANAGES_ZK=false  

配置集群 regionservers文件

slave1
Slave2

包分发到节点

scp -r hbase-2.2.4 slave1:/home
scp -r hbase-2.2.4 slave2:/home

master机器启动

start-hbase.sh

访问界面

http://10.211.55.67:16010/

遇到的问题

问题1

2019-03-05 23:13:49,508 WARN  [qtp1911600942-82] servlet.ServletHandler: /master-status
java.lang.IllegalArgumentException: org.apache.hbase.thirdparty.com.google.protobuf.InvalidProtocolBufferException: CodedInputStream encountered an embedded string or message which claimed to have negative size.
    at org.apache.hbase.thirdparty.com.google.protobuf.CodedInputStream.newInstance(CodedInputStream.java:155)
    at org.apache.hbase.thirdparty.com.google.protobuf.CodedInputStream.newInstance(CodedInputStream.java:133)
    at org.apache.hbase.thirdparty.com.google.protobuf.AbstractParser.parsePartialFrom(AbstractParser.java:162)
    at org.apache.hbase.thirdparty.com.google.protobuf.AbstractParser.parseFrom(AbstractParser.java:197)
    at org.apache.hbase.thirdparty.com.google.protobuf.AbstractParser.parseFrom(AbstractParser.java:203)
    at org.apache.hbase.thirdparty.com.google.protobuf.AbstractParser.parseFrom(AbstractParser.java:49)
    at org.apache.hadoop.hbase.zookeeper.MasterAddressTracker.parse(MasterAddressTracker.java:251)
    at org.apache.hadoop.hbase.zookeeper.MasterAddressTracker.getMasterInfoPort(MasterAddressTracker.java:87)
    at org.apache.hadoop.hbase.tmpl.master.BackupMasterStatusTmplImpl.renderNoFlush(BackupMasterStatusTmplImpl.java:50)
    at org.apache.hadoop.hbase.tmpl.master.BackupMasterStatusTmpl.renderNoFlush(BackupMasterStatusTmpl.java:119)
    at org.apache.hadoop.hbase.tmpl.master.MasterStatusTmplImpl.renderNoFlush(MasterStatusTmplImpl.java:423)
    at org.apache.hadoop.hbase.tmpl.master.MasterStatusTmpl.renderNoFlush(MasterStatusTmpl.java:397)
    at org.apache.hadoop.hbase.tmpl.master.MasterStatusTmpl.render(MasterStatusTmpl.java:388)
    at org.apache.hadoop.hbase.master.MasterStatusServlet.doGet(MasterStatusServlet.java:81)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)

解决
vim hbase-site.xml
添加

<property>
        <name>hbase.unsafe.stream.capability.enforce</name>
        <value>false</value>
</property>

问题2

Caused by: java.lang.ClassNotFoundException: org.apache.htrace.SamplerBuilder
        at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        ... 25 more

解决方案
到maven仓库下载htrace-core-3.1.0-incubating.jar包
放到hbase-2.1.4/lib/ 目录下

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值