码迷,mamicode.com
首页 > 移动开发 > 详细

java.io.IOException: There appears to be a gap in the edit log. We expected txid ***, but got txid

时间:2018-10-31 10:39:20      阅读:519      评论:0      收藏:0      [点我收藏+]

标签:数据   cluster   appears   恢复   its   pre   hadoop   破坏   class   

方式1

原因:namenode元数据被破坏,需要修复
解决:恢复一下namenode

hadoop namenode -recover


一路选择Y,一般就OK了

方式2

Need to copy the edits file to the journal node (I have 3 journal node s101 s102 s103)

[centos@s100 /home/centos/hadoop/ha/dfs/name1/current]$scp edits_0000000000000000041-0000000000000000043 centos@s101:/home/centos/hadoop/ha/dfs/journal/mycluster/current


[centos@s100 /home/centos/hadoop/ha/dfs/name1/current]$scp edits_0000000000000000041-0000000000000000043 centos@s102:/home/centos/hadoop/ha/dfs/journal/mycluster/current

[centos@s100 /home/centos/hadoop/ha/dfs/name1/current]$scp edits_0000000000000000041-0000000000000000043 centos@s103:/home/centos/hadoop/ha/dfs/journal/mycluster/current

[centos@s100 /home/centos/hadoop/ha/dfs/name1/current]$hdfs zkfc -formatZK

https://blog.csdn.net/u011478909/article/details/51864071

https://blog.csdn.net/wqhaber/article/details/77529049

java.io.IOException: There appears to be a gap in the edit log. We expected txid ***, but got txid

标签:数据   cluster   appears   恢复   its   pre   hadoop   破坏   class   

原文地址:https://www.cnblogs.com/felixzh/p/9881036.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!