HBaseFsck类的hbase hbck流程;hbck是一个很重的管理工具,他会访问所有rs,扫描整个meta表,以及读取所有table region里的regioninfo,所以不要频繁使用hbck,会给hbase带来压力
/** * This repair method requires the cluster to be online since it contacts * region servers and the masters. It makes each region's state in HDFS, in * hbase:meta, and deployments consistent. * * @return If > 0 , number of errors detected, if < 0 there was an unrecoverable * error. If 0, we have a clean hbase. */ public int onlineConsistencyRepair() throws IOException, KeeperException, InterruptedException { clearState(); // get regions according to what is online on each RegionServer //加载每个regionserver上的region,将regioninfo放入map中,regioninfo中没有metainfo loadDeployedRegions(); // check whether hbase:meta is deployed and online //加载meta表的regioninfo,并检查meta表的regioninfo recordMetaRegion(); // Check if hbase:meta is found only once and in the right place //检查meta表,有且只有一个region if (!checkMetaRegion()) { String errorMsg = "hbase:meta table is not consistent. "; if (shouldFixAssignments()) { errorMsg += "HBCK will try fixing it. Rerun once hbase:meta is back to consistent state."; } else { errorMsg += "Run HBCK with proper fix options to fix hbase:meta inconsistency."; } errors.reportError(errorMsg + " Exiting..."); return -2; } // Not going with further consistency check for tables when hbase:meta itself is not consistent. LOG.info("Loading regionsinfo from the hbase:meta table"); //扫描meta表,将regioninfo放入map中,添加metainfo信息 boolean success = loadMetaEntries(); if (!success) return -1; // Empty cells in hbase:meta? reportEmptyMetaCells(); // Check if we have to cleanup empty REGIONINFO_QUALIFIER rows from hbase:meta if (shouldFixEmptyMetaCells()) { fixEmptyMetaCells(); } // get a list of all tables that have not changed recently. if (!checkMetaOnly) { reportTablesInFlux(); } // load regiondirs and regioninfos from HDFS if (shouldCheckHdfs()) {//唯一一个默认是true的 loadHdfsRegionDirs();//获得所有hbase table region dir,将regioninfo hbckinfo上添加hdfsentry对象,表示region在hdfs上的信息 loadHdfsRegionInfos();//获得所有hbase table region hfile,检查region是否存在(meta region存在,hdfs region不存在) } // Get disabled tables from ZooKeeper loadDisabledTables(); // fix the orphan tables fixOrphanTables(); // Check and fix consistency checkAndFixConsistency();//默认流程,检查meta和hdfs上的region丢失 // Check integrity (does not fix) checkIntegrity();//默认流程,检查region漏洞 return errors.getErrorList().size(); }
相关推荐
该文件为hbase hbck2 jar;适用于hbase 2.x维护,hbase 1.x不适用;对于HBase跨集群HD集群迁移,当HDFS文件迁移后,使用HBCK客户端,完成HBase元数据修复。当前版本:hbase-hbck2-1.3.0.jarhbase hbck -j /opt/...
hbase hbck2 jar; 完整打包;...使用命令:hbase hbck -j hbase-hbck2-1.3.0-SNAPSHOT.jar fixMeta,最后两个参数分别代表 hbck2 jar包路径,维护命令(hbase-hbck2-1.3.0-SNAPSHOT.jar fixMeta)
hbase-hbck2-1.1.0-SNAPSHOT.jar
hbase hbck2修复工具hbase-operator-tools-1.0.0.1.0.0.0-618-bin.tar.gz,hbase1版本的hbck已经不支持修复命令,hbase2.1版本需要用这个新版的工具
hbase2.x-hbck2 jar包及测试命令
Hbase修复工具 示例情景: Q:缺失hbase.version文件 A:加上选项 -fixVersionFile 解决 Q:如果一个region即不在META表中,又不在hdfs上面,但是在regionserver的online region集合中 A:加上选项 -...
hbase 2.x以后取消了hbase hbck,需要使用hbase hbck2,我编译的这个版本可以支持hbase[2.0.3, 2.0.5, 2.1.1, 2.2.0, 3.0.0],具体怎么使用,可以参考 https://bbs.huaweicloud.com/blogs/353333,或者留言问我哈。
HBCK是HBase1.x中的命令,到了HBase2.x中,HBCK命令不适用,且它的写功能(-fix)已删除; HBCK2已经被剥离出HBase成为了一个单独的项目,如果你想要使用这个工具,需要根据自己HBase的版本,编译源码。其GitHub地址...
hbase 修复工具,hbck 编译好
处理hbase异常工具
hbase-exporterHBase Prometheus导出器收集指标并中继JMX指标以供Prometheus使用由于JMX中一些重要的指标缺失或为空,因此我们另外分析了HBase主界面,例如“过渡中的过时区域” 解析“ hbase hbck”命令的输出以...
hbase
hbase2修复工具jar包,用于hbase的rit等修复服务
java 利用 sping-data-hadoop HbaseTemplate 操作hbase find get execute 等方法 可以直接运行
搭建pinpoint需要的hbase初始化脚本hbase-create.hbase
HBase(hbase-2.4.9-bin.tar.gz)是一个分布式的、面向列的开源数据库,该技术来源于 Fay Chang 所撰写的Google论文“Bigtable:一个结构化数据的分布式存储系统”。就像Bigtable利用了Google文件系统(File System...
1. HBase有哪些基本的特征? 1 HBase特征: 1 2. HBase相对于关系数据库能解决的问题是什么? 2 HBase与关系数据的区别? 2 HBase与RDBMS的区别? 2 3. HBase的数据模式是怎么样的?即有哪些元素?如何存储?等 3 1...
hadoop集群配置流程以及用到的配置文件,hadoop2.8.4、hbase2.1.0、zookeeper3.4.12
hbase-sdk是基于hbase-client和hbase-thrift的原生API封装的一款轻量级的HBase ORM框架。 针对HBase各版本API(1.x~2.x)间的差异,在其上剥离出了一层统一的抽象。并提供了以类SQL的方式来读写HBase表中的数据。对...
不多说,上目录。 Preface 1.What Is HBase? 2.HBase Principles 3.HBase Ecosystem 4.HBase Sizing and Tuning Overview 5.Environment Setup 6.Use Case: HBase as a System of...18.HBCK and Inconsistencies Index