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 中进行完整性检查,你就解决了这个问题。









网友评论