kudu损坏的tablet分区处理

概要:

在一次数据迁移后,出现了损坏的分区,导致该分区的所有 tablet 副本丢失,原因不明。
解决方法:使用 kudu 提供的 unsafe_replace_tablet 命令将损坏的分区替换为空白分区,然后再重新倒入相关数据。

1 问题详情

查询时会报错:

1
$ Unable to open scanner: Timed out: Scan RPC to 10.1.3.15:7050 timed out after -9.109s (ON_OUTBOUND_QUEUE): Not found: Tablet not found: fba00c45e240418c802d7b0e2b5e4232

访问 kudu master 的 web 发现

这个分区确实是已经不可用了

2 解决方法

kudu 官方文档给出了相关的解决方法:https://kudu.apache.org/docs/troubleshooting.html#cfile_corruption

If data has been lost, you can repair the table by replacing the corrupt tablet with an empty one using the unsafe_replace_tablet tool.
如果所有的 tablet 数据已经丢失,可以使用 unsafe_replace_tablet 工具将其替换为空白的 tablet

unsafe_replace_tablet 使用方法: https://kudu.apache.org/docs/command_line_tools_reference.html#tablet-unsafe_replace_tablet

l
1
2
3
# 命令参数:kudu tablet unsafe_replace_tablet <master_addresses> <tablet_id>
$ su - kudu -s /bin/sh -c 'kudu tablet unsafe_replace_tablet 10.1.3.13:7051,10.1.3.14:7051,10.1.3.15:7051 fba00c45e240418c802d7b0e2b5e4232'
$ Replaced tablet fba00c45e240418c802d7b0e2b5e4232 with tablet aacc1554c476435386611e1dffe6bca7

问题解决,但是相关分区的数据也永久丢失了,需要重新倒入相关数据

3 问题的可能原因

KUDU-2376


kudu损坏的tablet分区处理
https://inio.cc/2019/10/24/数仓/kudu损坏的tablet分区处理/
作者
漂北一
发布于
2019年10月24日
更新于
2023年2月19日
许可协议