美文网首页
hbase 修复

hbase 修复

作者: 小马666 | 来源:发表于2023-03-11 20:08 被阅读0次

hbase查看 表状态
get 'hbase:meta', 'metric_25', 'table:state'
修改状态
put 'hbase:meta','stack_25','table:state',"\b\1"
https://community.cloudera.com/t5/Support-Questions/Hbase-table-is-stuck-in-quot-Disabling-quot-state-Neither/m-p/235112

这只是一篇知识分享文章。我在生产中遇到过这个问题,花了我一天的时间来解决它。

我分享的解决方法将帮助您让您的表在“已启用”状态下重新联机,而实际上无需删除 Zookeeper Hbase 表 znode 或任何数据。

以下是解决它的步骤。

1. 针对受影响表的hbase:meta运行“get”命令

<pre style="box-sizing: border-box; font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 16px; overflow: auto; display: block; padding: 11.5px; margin: 24px 0px 12px; line-height: 1.5; word-break: break-word; overflow-wrap: break-word; color: rgb(51, 51, 51); background-color: rgb(244, 245, 246); border: 1px solid rgb(214, 216, 219); border-radius: 4px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 300; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">hbase(main):003:0> 获取 'hbase:meta', '<AFFECTED_TABLE_NAME>', 'table:state' COLUMN CELL table:state timestamp=1551456805377, value=\x08\ <u style="box-sizing: border-box; word-break: break-word;">x02</u></pre>

2.注意上面的“值”。它指向\x08\x02这是错误的。该值应为<u style="box-sizing: border-box; word-break: break-word;">\x08\x00</u>(启用)或<u style="box-sizing: border-box; word-break: break-word;">\x08\x01</u>(禁用)

3. 手动编辑值。

<pre style="box-sizing: border-box; font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 16px; overflow: auto; display: block; padding: 11.5px; margin: 24px 0px 12px; line-height: 1.5; word-break: break-word; overflow-wrap: break-word; color: rgb(51, 51, 51); background-color: rgb(244, 245, 246); border: 1px solid rgb(214, 216, 219); border-radius: 4px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 300; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">hbase(main):003:0> put 'hbase:meta','<AFFECTED_TABLE_NAME>','table:state',"\b\0"</pre>

单击此处了解有关“控制字符”的更多信息

4. 验证相同。

<pre style="box-sizing: border-box; font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 16px; overflow: auto; display: block; padding: 11.5px; margin: 24px 0px 12px; line-height: 1.5; word-break: break-word; overflow-wrap: break-word; color: rgb(51, 51, 51); background-color: rgb(244, 245, 246); border: 1px solid rgb(214, 216, 219); border-radius: 4px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 300; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">hbase(main):003:0> get 'hbase:meta', '<AFFECTED_TABLE_NAME>', 'table:state'</pre>

“值”现在应该是<u style="box-sizing: border-box; word-break: break-word;">\x08\x00</u>

发布这个,再次运行禁用 <table_name>启用 <table_name>只是为了在 hbase shell 中进行完整性检查,你就解决了这个问题。

相关文章

  • HBase修复

    1表名替换 在shell命令执行 (1) disable ‘tablename’ // 制作快照 (2) sna...

  • Hbase修复

  • 10大HBase常见运维工具整理

    摘要:HBase自带许多运维工具,为用户提供管理、分析、修复和调试功能。本文将列举一些常用HBase工具,开发人员...

  • HBase常见运维工具整理

    HBase自带许多运维工具,为用户提供管理、分析、修复和调试功能,这些工具一部分的入口是hbase shell 客...

  • 2018-04-04 HBase常见的运维工具

    HBase自带许多运维工具,为用户提供管理、分析、修复和调试的功能,这些工具一部分的入口是hbase shell客...

  • HBase Region故障修复

    当HBase 集群down 了重启后,可能会出现有些region 没有上线成功,导致MapReduce 任务在处理...

  • HBase学习笔记(一)

    最近在学习HBase先关的知识,顺便做一下笔记,以加深知识的了解和掌握。 Hbase常用工具 文件检测修复工具 h...

  • HBase 常见错误修复方法

    在重启HBase Region Server后经常会使用hbase hbck 命令进行检测,有时会检测出一些错误,...

  • 小心hbck的-repair参数

    最近遇到一个使用hbck -repair修复HBase元数据遇到的坑,被坑得不清,周末都没休息好,时间全花在给hb...

  • Hbase运行机制

    本文思路 Hbase是什么 Hbase的优劣 Hbase架构 Hbase容错 Hbase使用总结 HBase是什么...

网友评论

      本文标题:hbase 修复

      本文链接:https://www.haomeiwen.com/subject/irkxrdtx.html