博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
hbase安装配置
阅读量:4981 次
发布时间:2019-06-12

本文共 6017 字,大约阅读时间需要 20 分钟。

环境准备

  1. Java
  2. HDFS
  3. zookeeper
  4. SSH,NTP时间同步
  5. 系统调优,这个可以等安装完后改,文件打开数(ulimit和nproc)
  6. 修改Hadoop HDFS Datanode同时处理文件的上限:dfs.datanode.max.xcievers

下载HBASE

http://mirror.bit.edu.cn/apache/hbase/

解压设置权限

1.tar -zxf habse.tar.gz -C /usr/local/habse

2.sudo chown -R hadoop:hadoop /usr/local/habse


配置conf/hbase-env.sh

#设置JAVA路径及CLASSPATHexport JAVA_HOME=/usr/local/java/jdk1.8.0_121export JAVA_CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar#设置不让HBASE管理ZKexport HBASE_MANAGES_ZK=false

配置conf/hbase-site.xml

hbase.master
master:60000
hbase.master.maxclockskew
180000
hbase.rootdir
hdfs://master:19000/hbase
hbase.cluster.distributed
true
hbase.zookeeper.quorum
master,slave1,slave2
hbase.zookeeper.property.dataDir
/usr/local/zookeeper/zookeeper-3.4.10/

参数说明:

  1. hbase.rootdir,HDFS的入口地址,地址和端口要和你的hadoop配置一样(core-site.xml中的fs.default.name),所有节点公用地址
  2. hbase.cluster.distributed,ture表示分布式
  3. hbase.zookeeper.property.clientPort , zookeeper端口
  4. hbase.zookeeper.quorum , zookeeper节点
  5. hbase.zookeeper.property.dataDir , zookeeper 保持信息的文件,默认为/tmp 重启会丢失

配置conf/regionservers

masterslave1slave2

分发配置好的文件

scp -r hbase/ hadoop@slavex:/usr/local

启动&停止HBASE

./bin/start-hbase.sh./bin/stop-hbase.sh

启动成功后使用jps命令即可看到相关进程


查看HABSE日志

  1. 在logs目录下可以看到HBASE日志.如果启动不成功可以查看相关log日志中是否报错.


错误[zookeeper.MetaTableLocator: Failed]

一般认为是,停止Hbase服务时导致zookeeper的meta数据丢失或损毁所致,解决办法时,停止HBase服务,停止ZooKeeper服务,把zookeeper的每个节点的zoo.cfg指定的dataDir=/hadoop/zookeeper-data目录的文件清除掉,然后重启zookeeper,再重启hbase,再去观察hbase主控节点日志hbase-hadoop-master-master.log,发现一切正常,问题已经得到解决!

http://blog.csdn.net/davylee2008/article/details/70157957

7-05-09 11:11:56,975 INFO  [master:16000.activeMasterManager] master.MasterFileSystem: Log folder hdfs://master:19000/hbase/WALs/master,16020,1494299508333 belongs to an existing region server2017-05-09 11:11:57,063 INFO  [master:16000.activeMasterManager] zookeeper.MetaTableLocator: Failed verification of hbase:meta,,1 at address=master,16020,1494298875879, exception=org.apache.hadoo hbase:meta,,1 is not online on master,16020,1494299508333    at org.apache.hadoop.hbase.regionserver.HRegionServer.getRegionByEncodedName(HRegionServer.java:2915)    at org.apache.hadoop.hbase.regionserver.RSRpcServices.getRegion(RSRpcServices.java:979)    at org.apache.hadoop.hbase.regionserver.RSRpcServices.getRegionInfo(RSRpcServices.java:1258)    at org.apache.hadoop.hbase.protobuf.generated.AdminProtos$AdminService$2.callBlockingMethod(AdminProtos.java:22233)    at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:2137)    at org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:107)    at org.apache.hadoop.hbase.ipc.RpcExecutor.consumerLoop(RpcExecutor.java:133)    at org.apache.hadoop.hbase.ipc.RpcExecutor$1.run(RpcExecutor.java:108)    at java.lang.Thread.run(Thread.java:745)

解决第一步错误后master启动成功,slavex报错

查看错误信息后发现是hdfs-site.xml中 hdfs://master;19000/hbase 配置项错误

-Dhbase.root.logger=INFO,RFA, -Dhbase.security.logger=INFO,RFAS]2017-05-09 11:44:30,649 INFO  [main] regionserver.RSRpcServices: regionserver/slave1/172.26.203.134:16020 server-side HConnection retries=3502017-05-09 11:44:30,841 INFO  [main] ipc.SimpleRpcScheduler: Using deadline as user call queue, count=32017-05-09 11:44:30,859 INFO  [main] ipc.RpcServer: regionserver/slave1/172.26.203.134:16020: started 10 reader(s) listening on port=160202017-05-09 11:44:31,299 WARN  [main] util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable2017-05-09 11:44:31,442 ERROR [main] regionserver.HRegionServerCommandLine: Region server exitingjava.lang.RuntimeException: Failed construction of Regionserver: class org.apache.hadoop.hbase.regionserver.HRegionServer    at org.apache.hadoop.hbase.regionserver.HRegionServer.constructRegionServer(HRegionServer.java:2652)    at org.apache.hadoop.hbase.regionserver.HRegionServerCommandLine.start(HRegionServerCommandLine.java:64)    at org.apache.hadoop.hbase.regionserver.HRegionServerCommandLine.run(HRegionServerCommandLine.java:87)    at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)    at org.apache.hadoop.hbase.util.ServerCommandLine.doMain(ServerCommandLine.java:126)    at org.apache.hadoop.hbase.regionserver.HRegionServer.main(HRegionServer.java:2667)Caused by: java.lang.reflect.InvocationTargetException    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)    at org.apache.hadoop.hbase.regionserver.HRegionServer.constructRegionServer(HRegionServer.java:2650)    ... 5 moreCaused by: java.io.IOException: Incomplete HDFS URI, no host: hdfs://master;19000/hbase    at org.apache.hadoop.hdfs.DistributedFileSystem.initialize(DistributedFileSystem.java:136)    at org.apache.hadoop.fs.FileSystem.createFileSystem(FileSystem.java:2591)    at org.apache.hadoop.fs.FileSystem.access$200(FileSystem.java:89)    at org.apache.hadoop.fs.FileSystem$Cache.getInternal(FileSystem.java:2625)    at org.apache.hadoop.fs.FileSystem$Cache.get(FileSystem.java:2607)    at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:368)    at org.apache.hadoop.fs.Path.getFileSystem(Path.java:296)    at org.apache.hadoop.hbase.util.FSUtils.getRootDir(FSUtils.java:1002)    at org.apache.hadoop.hbase.regionserver.HRegionServer.
(HRegionServer.java:563) ... 10 more

转载于:https://www.cnblogs.com/0xcafedaddy/p/6830400.html

你可能感兴趣的文章
关于MySql数据库设计表与查询耗时分析
查看>>
动画参数
查看>>
一道(古老的)英文题
查看>>
定义一些常亮
查看>>
怎么准确的判断当前页面是否有虚拟导航栏
查看>>
客户端(浏览器端)数据存储技术概览
查看>>
redis发布(pub)、订阅(sub)模式
查看>>
Python数据分析-知识宝藏
查看>>
安装libwxsmithlib-dev时提示“正试图覆盖...”的错误
查看>>
logback日志丢失的情况之一
查看>>
Style Transfer for Headshot Portraits
查看>>
[Windows Phone 7璀璨]北漂1.0在线歌词播放器一.项目搭建及版权声明
查看>>
ios 添加多个target 管理 多个版本文件
查看>>
二阶段之四
查看>>
masonry框架的使用之-多个视图的均匀等间距分布
查看>>
平面最近点对(分治)
查看>>
如何将centos7自带的firewall防火墙更换为iptables防火墙
查看>>
Intent 的两种主要使用方法
查看>>
5239-回忆京都-洛谷3月赛gg祭
查看>>
c# API接受图片文件以Base64格式上传图片
查看>>