修复方法如下:
第1步,用getClusterChunksStatus在控制节点上得到 `/dwd/domain'的chunkid,示例代码如下:
select * from rpc(getControllerAlias(), getClusterChunksStatus) where file like "%/domain%" and state != 'COMPLETE'
第2步,用getAllChunks得到该chunkid在数据节点的分区信息,下面代码中chunkid为第1步执行结果得到的"4503a64f-4f5f-eea4-4247-a0d0fc3941a1"。
select * from pnodeRun(getAllChunks) where chunkId="4503a64f-4f5f-eea4-4247-a0d0fc3941a1"
第3步,用copyReplicas复制分区副本,假设第2步的结果显示分区副本在datanode3上,现在往datanode1上复制一份:
rpc(getControllerAlias(), copyReplicas{`datanode3, `datanode1, "4503a64f-4f5f-eea4-4247-a0d0fc3941a1"})
第4步,用getClusterChunksStatus验证分区状态已为COMPLETE,说明修复成功。