请问当元数据异常时,强制删除数据的方式有哪些?

当执行

dropDatabase("dfs://dolphin_day_bar")

报错

<ChunkInRecovery>deleteSubChunks failed on '/dolphin_day_bar', chunk 0224d999-38c1-1ebc-ce46-0cdf7ea6903b is in RECOVERING state

请先 登录 后评论

1 个回答

Jax Wu

两个方案

第一种

dbName="/stocks_orderbook"
fileCond=dbName + "%"
t=exec substr(file,strlen(dbName)) from rpc(getControllerAlias(),getClusterChunksStatus) where file like fileCond, state != "COMPLETE"
dropPartition(database("dfs:/"+dbName),t,,true)


第二种

deleteChunkMetaOnMaster("dfs://compoDB/20170808/0_50")//删除控制节点元数据
deleteReplicas(chunkId,node)//删除数据节点元数据



请先 登录 后评论