HBase hbck 命令详解

hbck是hbase里用来检测 region一致性,表完整性问题及修复损坏的命令行工具。它有2种工作模式:
只读不一致性识别模式(默认模式,但不尝试修复)
多阶段读写修复模式 (如果发现错误,则尝试修复)
注:如果只检查特定的表 则用: hbck ..
常用选项:
1. -details 顾名词义,打印详细结果
2. -fix 用来修复region级别的不一致性。其内部的操作顺序如下
先查是否存在不一致的。
如有表级别的不一致性,则先修复表的不一致问题。
如有region级别的不一致性,则修复该级别的问题。在修复期间region是关闭状态
也可以通过其它方式来修复不一致性,如下:
-fixAssignments repairs unassigned, incorrectly assigned or multiply assigned regions. 修复没有分配的,已分配但不正确的单个region或者多个region。
-fixMeta removes rows from hbase:meta when their corresponding regions are not present in HDFS and adds new meta rows if regions are present in HDFS but not in hbase:meta. 当从hbase:meta表相关的region在hdfs里找到,则移除这些行。如果这些region在hdfs里,则在hbase.meta里增加新的行
-repairHoles creates HFiles for new empty regions on the filesystem and ensures that the new regions are consistent. 在空的region里新建一个HFiles,却表新的region是一致的。
-fixHdfsOrphans repairs a region directory that is missing a region metadata file (the .regioninfo file).在region目录里 修复那些缺失region元数据的文件如(.regioninfo)
-fixHdfsOverlaps fixes overlapping regions. You can further tune this argument using the following options: 修复重叠的regions。与此同时结合以下选项:
-maxMerge controls the maximum number of regions to merge. 控制最大合并region的数量。
-sidelineBigOverlaps attempts to sideline the regions which overlap the largest number of other regions. 尝试退出那些与其它region有最大数量的重叠的region
-maxOverlapsToSideline limits the maximum number of regions to sideline. 限制退出region的最大数量。

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值