博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
hbase配置高可用
阅读量:3962 次
发布时间:2019-05-24

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

前戏

四台虚拟机要免密钥

先启动zookeeper
启动hadoop;hbase要四台虚拟机所有的文件都放到hdfs上

开整

配置文件:(conf/regionservers )(配置的是小弟)

node7-1node7-3node7-4

配置文件:(conf/backup-masters )(配置的是二哥,大哥挂掉,二哥顶上)(复制的regionservers 新建的)

node7-1node7-3

配置文件:(conf/hbase-site.xml )(配置的是小弟)

hbase.rootdir
hdfs://node7-1:8020/data/hbase
hbase.unsafe.stream.capability.enforce
false
检查兼容性,如果设置为false,数据有可能丢失(这是一个警告) Controls whether HBase will check for stream capabilities (hflush/hsync). Disable this if you intend to run on LocalFileSystem, denoted by a rootdir with the 'file://' scheme, but be mindful of the NOTE below. WARNING: Setting this to false blinds you to potential data loss and inconsistent system state in the event of process and/or node failures. If HBase is complaining of an inability to use hsync or hflush it's most likely not a false positive.
hbase.zookeeper.quorum
node7-1:2181,node7-2:2181,node7-3:2181
hbase.zookeeper.property.dataDir
/data/hbase/zookeeper_data
hbase.cluster.distributed
true

配置文件:(conf/hbase-env.sh )

配置jdk路径,将hbase自带的zookeeper关掉

在这里插入图片描述

在想当大哥的服务器启动hbase;(node7-2)

bin/start-hbase.sh

关掉

bin/stop-hbase.sh

访问

http://node7-2:16010/

在这里插入图片描述
在这里插入图片描述

注:1.因为Hbase连接hadoop是通过hdfs协议的,所有hadoop的配置文件是无法读取的;

我们要把hadoop所有的配置文件拷贝过来;就可以生效;
2.如果想清空hbase的所有数据重新来一遍
清空hdfs
清空zookeeper

转载地址:http://sgrzi.baihongyu.com/

你可能感兴趣的文章
MyEclipse不编译问题的解决
查看>>
Commons FileUpload组件使用方法(包含源代码)
查看>>
doubleselect用法 显示不换行
查看>>
应届毕业生培训计划
查看>>
SelectItem and LinkedHashMap
查看>>
JNI(Java Native Interface) Native Method
查看>>
$wnd and $doc Calling native JavaScript with JSNI
查看>>
GWT体系结构
查看>>
Struts 验证 Struts2 表单 
查看>>
MySQL 中文显示乱码
查看>>
Hibernate 异常:Association references unmapped class
查看>>
破解版的PowerDesigner15没有OOM吗?
查看>>
Java解释Excel数据(jxl.jar包的使用)
查看>>
操作Excel的jxl包的使用
查看>>
异常:Error: java.lang.IncompatibleClassChangeError: Implementing class
查看>>
Flex Java Object对应关系
查看>>
常用的Flex代码总结
查看>>
div居中的设置该如何编写css?
查看>>
eclipse常用设置
查看>>
MySQL:日期函数、时间函数总结(MySQL 5.X)
查看>>