restore报错 - Error in restore: openChunks failed to find enough datanodes for write, need 1 datanodes, found 0

机器A备份(版本v1.30.15):

backup(backupDir="/data/backups",sqlObj=<select * from loadTable("dfs://kbar","kbar_1min") where date>=2012.01.01 and date<=2021.12.31>, parallel=true)

机器B恢复(版本v1.30.19):

restore("/data/backups","dfs://kbar","kbar_1min","%",true);


恢复进度一半多的时候报错:

Error in restore: openChunks failed to find enough datanodes for write, need 1 datanodes, found 0


下面是一些初步分析的信息:


1. 检查发现两台机器上目录不一致:机器B路径多了一个层级

机器A:local8848/storage/CHUNKS/kbar/20160118/Key0/kbar_1min_1

机器B:local8848/storage/CHUNKS/kbar/20160118/Key0/2/kbar_1min_2

UPDATE:如果机器B使用老版本v1.30.15则和机器A的路径一致,猜测是不同版本的数据restore有潜在问题


2. 检查日志发现一直有如下warning:

<WARNING> :openChunks trying to colocate chunk path[/kbar/20160118/Key2/2] with its siblings but there is not enough replicas on sibling chunk, only 0 need 1


3. 在机器B使用sql数据检索还原成功的数据时必须指定symbol才有数据:

- 返回空数据:select * from loadTable("dfs://kbar", "kbar_1min") where date=2012.01.04

- 返回正常数据:select * from loadTable("dfs://kbar", "kbar_1min") where date=2012.01.04 and symbol=`600519.SH


请先 登录 后评论

1 个回答

wale

openChunks failed to find enough datanodes for write, need 1 datanodes, found 0这个报错一般是剩余磁盘空间不足3%了,请检查一下磁盘空间。

请先 登录 后评论
  • 1 关注
  • 0 收藏,1059 浏览
  • Evan 提出于 2022-08-01 11:47

相似问题